DSP System Toolboxâ¢. ⢠Useful for desktop or real-time applications with hardware. MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.
ni.com
1
Integrating .m, .mdl and Real-Time Hardware for Math, Signal Processing, & Controls Brett Burger Sr. Product Manager Embedded Systems
ni.com
High-Level Design Models C Code
Data Flow
Desktop
ni.com
Textual Math
Simulation
FPGA
Real-Time
3
Statechart
Microprocessors
LabVIEW MathScript RT Background Textual node & interactive window • Added plug-ins: •
• •
•
Compatible with The MathWorks, Inc.: • • • •
•
LabVIEW Control Design & Simulation Module LabVIEW Digital Filter Design Toolkit MATLAB® Signal Processing Toolbox™ Control System Toolbox™ DSP System Toolbox™
Useful for desktop or real-time applications with hardware MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc..
ni.com
4
LabVIEW MathScript RT Module •
Text-based controls, signal processing, analysis, and math • •
•
•
900 built-in functions / userdefined functions Reuse many of your .m file scripts created with The MathWorks, Inc. MATLAB® software and others Based on original math from NI MATRIXx software
A native LabVIEW solution •
• •
Interactive and programmatic interfaces Does not require 3rd-party software Enables hybrid programming MATLAB® is a registered trademark of The MathWorks, Inc..
ni.com
5
Data Types in MathScript • • • • • •
Real and complex numerics & matrices Booleans and strings Structs (can come from LabVIEW clusters) Cell arrays Plot objects W/ LabVIEW Control Design & Simulation Module: • •
•
ni.com
Transfer function model State space model Zero-pole-gain model
6
Additional MathScript Capabilities • •
• •
•
User-defined functions Global variables shared between interactive window and node Special MathScript probe for debugging node Warning glyphs and guidance to improve run-time performance Nodes can run in parallel and on multi-core computers
ni.com
7
MathScript Demo Evaluation software available. Try it for your application. Support &Training Available.
ni.com
LabVIEW Control Design and Simulation Module • •
Both signal flow and .m file development Single environment for: • •
Simulation of dynamic systems Real-time implementation for rapid control prototyping or hardware-in-the-loop simulation
ni.com
9
Standard Notation Reduces Learning Curve LabVIEW Control Design & Simulation Module
The Simulink® software environment
Simulink® is a registered trademark of The MathWorks, Inc.
ni.com
10
Simulink® conversion Convert plant and controller models you create in the Simulink® environment into LabVIEW Control Design & Simulation Module code
Simulink® is a registered trademark of The MathWorks, Inc.
ni.com
11
Co-Simulation w/ Multidomain Modeling Tools •
• • •
•
LMS AMESim Dassault Systemes Dymola Maplesoft MapleSim The MathWorks, Inc. Simscape™ ITI SimulationX
ni.com
12
Real-Time on Multicore Processors (DEMO)
Assign timed loops to specific processor cores.
ni.com
13
LabVIEW Control Design & Simulation Benefits •
Complete simulation and real-time implementation capability - stay in one environment from design to test to implementation
•
Easily create parallel and multirate simulation or control loops, leverage
multicore •
•
Custom user interface to change and observe parameters as simulation or control system is running Use VIs or programming structures inside or outside of simulation loops: • Integrated design and simulation, batch simulation • DAQ, RIO, Vision, or CAN for I/O ni.com
14
Deploy to Hardware Through LabVIEW MathScript RT Module
Control Design & Simulation Module
The MathWorks Inc. software development environment Your .m code
MATLAB®
Your .mdl code
Simulink®
Simulink Coder™
LabVIEW Real-Time CompactRIO, Single-Board RIO, PXI, or desktop
NI VeriStand MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.
Control Design & Simulation Toolkit Demo Evaluation software available. Try it for your application. Support &Training Available.
ni.com
ISC Ltd. w/ Houlder Ltd. Dr. Andy Clegg, Lead Engineer & ISC Managing Director: “We used the LabVIEW MathScript RT Module to run a textual node containing our m-file code, developed with MATLAB on a desktop, for kinematics on the real-time CompactRIO controller. MathScript has significant benefits for real-time deployment on the CompactRIO controller including determinism, easy debugging, and no extra compilation steps.“
ni.com
17
Video “TAS (Turbine Access System)” •
http://www.youtube.com/watch?v=N21en93lrqg
ni.com
18
Multi-Modal Rover for Search and Rescue Coordinated Robotics Lab
“With both an FPGA and a PowerPC processor, the Single-Board RIO platform has the flexibility to handle a variety of programming tasks and algorithms in an efficient manner. Onboard Ethernet, combined with a Wi-Fi adapter, enables realtime wireless communication, debugging, and deployment of software” – Nick Morozovsky, Mechanical Engineering PhD student, Switchblade project leader
ni.com
19
Video “UCSD Switchblade Robot” http://www.youtube.com/watch?v=Dw0WxPlyWlI
ni.com
20
Wind turbine HIL Testing •
• •
Siemens Wind Power Denmark
Hardware-in-the-loop (HIL) simulation of wind, pitch & blade position to test turbine controller Multicore PXI, LabVIEW RT & FGPA LabVIEW Control Design & Simulation Module
Real-time HIL model
ni.com
21
Industrial HIL – National Oilwell Varco Application. Create a test system to evaluate PLC performance before installing it offshore Challenge. Modeling an industrial pump (including drives, gears, and drill string) and running it on cost effective hardware Products used. LabVIEW, Mathscript and the Control Design and Simulation Module “Having a simulation of the plant allow us to test our algorithm on the PLC on different working conditions much faster and effectively” - Pål Jacob Nessjøen, development
advisor
ni.com
22
Developing a Control System to Automatically Position a Split-Hopper Vessel Application: Build a control system that keeps a ship on a fixed position and heading Challenge: Design an advanced control system with DGPS, wind, current, gyroscope feedback Products: PXI, cRIO, RT, LabVIEW Control Design and Simulation Module Key Benefit: Use a common platform to develop controller and deploy system able to integrate third party information systems. “We used NI tools because its software allowed us to reuse the same code from simulation to deployment and its hardware was reliable” Miguel Taboada, SEAPLACE ni.com
23
Deploy to Hardware Through LabVIEW MathScript RT Module
Control Design & Simulation Module
The MathWorks Inc. software development environment Your .m code
MATLAB®
Your .mdl code
Simulink®
Simulink Coder™
LabVIEW Real-Time
NI VeriStand MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.
CompactRIO, Single-Board RIO, PXI, or desktop ni.com
24
Stay Connected During and After theSymposium ni.com/nidayscommunity
facebook.com/nidays twitter.com/#!/nidays youtube.com/nidays
ni.com
25