Introduction to Simulink & Stateflow. Coorous Mohtadi



Similar documents
Using MCC GPIB Products with LabVIEW

LAN extensions for Instrumentation

Introduction to MATLAB Gergely Somlay Application Engineer

VIRTUAL INSTRUMENTATION

OPC COMMUNICATION IN REAL TIME

R&S AFQ100A, R&S AFQ100B I/Q Modulation Generator Supplement

Entwicklung und Testen von Robotischen Anwendungen mit MATLAB und Simulink Maximilian Apfelbeck, MathWorks

Product Development Flow Including Model- Based Design and System-Level Functional Verification

R&S AFQ100A, R&S AFQ100B I/Q Modulation Generator Supplement

DAQ in MATLAB HANS-PETTER HALVORSEN,

N6171A MATLAB Data Analysis Software for Agilent Instruments

CMS Central Monitoring System

Schnell und effizient durch Automatische Codegenerierung

StateFlow Hands On Tutorial

PLCs and SCADA Systems

Straton and Zenon for Advantech ADAM Copalp integrates the straton runtime into the ADAM-5550 device from Advantech

Eli Levi Eli Levi holds B.Sc.EE from the Technion.Working as field application engineer for Systematics, Specializing in HDL design with MATLAB and

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

ELECTRICAL ENGINEERING

F-16 Modular Mission Computer Application Software

LabVIEW Advanced Programming Techniques

Agilent MATLAB Data Analysis Software Packages for Agilent Oscilloscopes

What s New in MATLAB and Simulink

CONTROL CODE GENERATOR USED FOR CONTROL EXPERIMENTS IN SHIP SCALE MODEL

Lab Diagramming External Traffic Flows

Model-Driven Software Development for Robotics: an overview

Improving Test Performance through Instrument Driver State Management

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

Development of AUTOSAR Software Components within Model-Based Design

INTRODUCTION... 3 WHAT IS LXI?... 3 NETWORK BASICS... 4 LXI VS. GPIB... 5 LXI CORE FEATURES... 6 INTERCHANGEABLE VIRTUAL INSTRUMENT (IVI) DRIVERS...

Nota Tecnica UBIQUITY 4 TN0016. The document describes the latest updates introduced in Ubiquity 4.

How to Use Rohde & Schwarz Instruments in MATLAB Application Note

Technical Training Module ( 30 Days)

Advanced Server Virtualization: Vmware and Microsoft Platforms in the Virtual Data Center

Converting Models from Floating Point to Fixed Point for Production Code Generation

Echtzeittesten mit MathWorks leicht gemacht Simulink Real-Time Tobias Kuschmider Applikationsingenieur

Software Development with Real- Time Workshop Embedded Coder Nigel Holliday Thales Missile Electronics. Missile Electronics

Ways to Use USB in Embedded Systems

Lab Diagramming Intranet Traffic Flows

R&S AFQ100A, R&S AFQ100B I/Q Modulation Generator Supplement

Software Development Principles Applied to Graphical Model Development

INDUSTRIAL CONTROL TECHNOLOGY. A Handbook for Engineers and Researchers. Peng Zhang. Beijing Normal University, People's Republic of China

Load DynamiX Storage Performance Validation: Fundamental to your Change Management Process

Learning Systems Software Simulation

R&S VISA Release Notes Software Version 5.5.4

Degree programme in Automation Engineering

Professional Organization Checklist for the Computer Science Curriculum Updates. Association of Computing Machinery Computing Curricula 2008

Lecture 3 - Model-based Control Engineering

The Next Generation in Automated Oscilloscope Test

Hybrid Modeling and Control of a Power Plant using State Flow Technique with Application

Candle Plant process automation based on ABB 800xA Distributed Control Systems

TURBOtech srl. SED-635 Digital Excitation System. Industrial Electronics Sector FEATURES

SAN Conceptual and Design Basics

Robotics and Automation Blueprint

VMware vcloud Networking and Security Overview

NEW GENERATION PROGRAMMABLE AUTOMATION CONTROLLER

Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks

OPNET Network Simulator

CS Standards Crosswalk: CSTA K-12 Computer Science Standards and Oracle Java Programming (2014)

Massachusetts Institute of Technology

IC 1101 Basic Electronic Practice for Electronics and Information Engineering

Dong-Joo Kang* Dong-Kyun Kang** Balho H. Kim***

Why Adopt Model-Based Design for Embedded Control Software Development?

DCMS DC MOTOR SYSTEM User Manual

Development Hints and Best Practices for Using Instrument Drivers

Final Year Projects at itm. Topics 2010/2011

Simulink Getting Started Guide

USTC Course for students entering Clemson F2013 Equivalent Clemson Course Counts for Clemson MS Core Area. CPSC 822 Case Study in Operating Systems

Linux. Reverse Debugging. Target Communication Framework. Nexus. Intel Trace Hub GDB. PIL Simulation CONTENTS

Introduction to Simulink

Software INTERACT. MachineLogic. The Shortest Distance Between Man and Machine

Simulink Modeling Guidelines for High-Integrity Systems

User s Manual TCP/IP TO RS-232/422/485 CONVERTER. 1.1 Introduction. 1.2 Main features. Dynamic DNS

Machinery condition monitoring software

Module 1 Overview ControlLogix5000

Development Hints and Best Practices for Using Instrument Drivers

EasyC. Programming Tips

Redundant Serial-to-Ethernet Data Connections for Mission-critical Devices

Software Development to Control the Scorbot ER VII Robot With a PC

3.1 RS-232/422/485 Pinout:PORT1-4(RJ-45) RJ-45 RS-232 RS-422 RS-485 PIN1 TXD PIN2 RXD PIN3 GND PIN4 PIN5 T PIN6 T PIN7 R+ PIN8 R-

DUKANE Intelligent Assembly Solutions

Lecture 9 Modeling, Simulation, and Systems Engineering

Testing Intelligent Device Communications in a Distributed System

Autonomous Advertising Mobile Robot for Exhibitions, Developed at BMF

Data Analysis with MATLAB The MathWorks, Inc. 1

SCADE Suite in Space Applications

WinCon Programmable Automation. Controller

T-BOXN12R. First steps with T-BOXN12R. You can make it wireless. Date: Version 1.0

SNMP INTERFACES AND SOFTWARE FOR SINGLE-PHASE UPS

Status Monitoring. Using Drivers by Seagull to Display Printer Status Information WHITE PAPER

D800002X122 March Getting Started With Your DeltaV Digital Automation System

GEDAE TM - A Graphical Programming and Autocode Generation Tool for Signal Processor Applications

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

Computer Controlled Generating Stations Control and Regulation Simulator, with SCADA SCE

MathWorks Products and Prices North America Academic March 2013

Práctica 1: PL 1a: Entorno de programación MathWorks: Simulink

Transcription:

Introduction to Simulink & Stateflow Coorous Mohtadi 1

Key Message Simulink and Stateflow provide: A powerful environment for modelling real processes... and are fully integrated with the MATLAB environment. Instrument Control and Data Acquisition enable verification and validation of models 2

Agenda What is Simulink? What is Stateflow? How to connect to outside world? 3

Why Build Models? Verify Designs Validate Requirements Process Analysis Speed up Design Performance Optimization Speed up Testing Training 4

Dealing with Growing Complexity Past to Present 5

Overview of MATLAB The leading environment for technical computing Interactive development environment Technical computing language Data analysis and visualization Algorithm development 6

Introduction to Simulink Block-diagram environment Model, simulate, and analyze multidomain systems Accurately design, implement, and test: Control systems Signal processing systems Communications systems Other dynamic systems 7

Simulink Product Key Features Extensive and expandable libraries of predefined blocks Hierarchical, component-based modelling Open Application Program Interface (API) Hybrid (mixed-signal), multirate and multitasking system simulation Full MATLAB integration 8

Types of Models Continuous-Time Discrete-Time / Multi-Rate Sampled-Data Finite State Machines / Mode Logic Discrete Event Systems Physical Domains 9

Products Used in this example MATLAB Simulink Simulink Control Design (only for PID Tuning) Simulink Design Optimization (only for PID Tuning) 10

PID Control of a DC Motor V R L ω V T K K i i b R di L dt d J dt 1 i ( V K i R) dt L 1 ( T K i b ) dt J K J,b i 11

What Have You Seen? Modelling equations in Simulink Building a system with hierarchy Parameterisation and integration with MATLAB Continuous control example Design with simulation 12

Agenda What is Simulink? What is Stateflow? How to connect to outside world? 13

What is a finite state machine? A representation of a reactive system that contains a finite number of states System changes states based on defined conditions Examples: Automatic transmission: First, second, third, and fourth gears Actuator in a fault detection, isolation, and recovery system: Active, standby, off, isolated Robot arm Initialization, normal mode, or shutdown 14

Stateflow Overview Extend Simulink with a design environment for developing state machines and flow charts Design systems containing control, supervisory, and mode logic Describe logic in a natural and understandable form with deterministic execution semantics 15

How does Stateflow work with Simulink? Simulink is used to respond to continuous changes in dynamic systems. Stateflow is used to respond to instantaneous changes in dynamic systems. Real-world systems have to respond to both continuous and instantaneous changes. suspension dynamics gear changes propulsion system liftoff stages robot kinematics operation modes Use both Simulink and Stateflow so that you can use the right tool for the right job. 16

Products used in this example MATLAB Simulink Stateflow 17

Key Features Defines functions Procedurally, using Embedded MATLAB TM Graphically, using flow diagrams In tabular form, with truth tables Provides language elements, hierarchy, and parallelism Animates Stateflow charts Incorporates custom and legacy C code Performs static and run-time checks 18

Working with Stateflow Create Stateflow charts Drag and drop states, junctions, and functions from a graphical palette into the drawing window Create transitions and flow by connecting states and junctions together Reduce a complex chart to a set of simpler, hierarchically organized diagrams using subcharts 19

Working with Stateflow Execute Stateflow charts After modeling your logic in Stateflow, you can simulate and view its behaviour live to test and validate your design by: Highlighting the active states and the transition paths taken Viewing states and data with the displays and scopes provided in Simulink Building your own custom displays using MATLAB visualization tools 20

Agenda What is Simulink? What is Stateflow? How to connect to outside world? 21

Connect to the Real World Instrument Control Toolbox Data Acquisition Toolbox 22

Instrument Control Toolbox Control and communicate with scientific instruments Integrate instruments into MATLAB applications and Simulink models Interactive tool for detecting and controlling instruments Automatic code generation for faster and easier implementation Support for IVI, VXIplug&play, and MATLAB instrument drivers Support for common communication protocols 23

Instrument Control Toolbox: Supported Instrument Manufacturers, Standards, and Protocols Agilent Anritsu LeCroy Rohde & Schwarz Tektronix Others Standards such as IVI, VXIplug&play, LXI Protocols such as GPIB, VISA, TCP/IP, UDP Serial devices Any device with a RS-232, RS-422, or RS-485 interface (EEGs, mass spectrometers, etc.) For a full support listing, visit: www.mathworks.com/products/instrument 24

Instrument Control Toolbox: Instrument Drivers Industry-standard instrument drivers Interchangeable Virtual Instrument (IVI ) drivers VXIplug&play drivers Several hundred supported instruments Drivers available through the instrument vendor Instrument drivers do not require knowledge of low-level commands fwrite(obj, TRIG:MAI:EDGE:SLO RIS ); set(obj, TriggerSlope, Rising ); 25

Instrument Control Toolbox: Instrument Drivers MATLAB Instrument Driver Vendor Instrument Driver (IVI or VXIplug&play) Automatically create MATLAB instrument driver for vendor s driver Customize MATLAB driver to extend or enhance vendor s driver Create custom MATLAB driver for any instrument MATLAB instrument drivers available at: www.mathworks.com/products/instrument/drivers 26

Benefits of using MATLAB with Instrument Control Toolbox 1. Use MATLAB as your single software environment for data acquisition, data analysis, and application development Saves time transferring data Only maintain one software tool (product upgrades, training, maintenance costs, etc.) 2. MATLAB and Instrument Control Toolbox are hardware neutral You are not tied to one hardware manufacturer Mix hardware from multiple manufacturers today Easily switch hardware tomorrow 3. MATLAB is widely used Over 1,000,000 users Technical personnel available with MATLAB experience 27

Using Instrument Control Toolbox with Simulink Control and acquire data from instruments and serial devices such as RS-232 directly into Simulink Also supports communication with remote applications using TCP/IP and UDP 28

Data Acquisition Toolbox Acquire and output data from data acquisition boards Immediately analyze live or acquired data in MATLAB and Simulink Configure hardware without leaving MATLAB Incorporate custom analysis into PC-based digital oscilloscope Ability to do one-shot or continuous acquisition Support multiple data acquisition devices and vendors 29

Data Acquisition Toolbox: Supported Hardware Agilent (Acqiris) ADLINK Advantech CONTEC Data Translation g.tec IOTech Keithley Measurement Computing (MCC) National Instruments Ono Sokki United Electronic Industries VXI Technology Any PC compatible sound card Parallel Port For a full support listing, visit: www.mathworks.com/products/daq 30

Benefits of using MATLAB with Data Acquisition Toolbox 1. Use MATLAB as your single software environment for data acquisition, data analysis, and application development Saves time transferring data Only maintain one software tool (product upgrades, training, maintenance costs, etc.) 2. MATLAB and Data Acquisition Toolbox are hardware neutral You are not tied to one hardware manufacturer Mix hardware from multiple manufacturers today Easily switch hardware tomorrow 3. MATLAB is widely used Over 1,000,000 users Technical personnel available with MATLAB experience 31

Using Data Acquisition Toolbox with Simulink Acquire live or measured data directly into Simulink models from data acquisition devices Directly evaluate your Simulink algorithms against real-world data 32

Conclusion Simulink and Stateflow provide: A powerful environment for modelling real processes... and are fully integrated with the MATLAB environment. Instrument Control and Data Acquisition enable verification and validation of models 33

Overview of The MathWorks Bernard McKeown bernard.mckeown@mathworks.co.uk