National Instruments Confidential LabVIEW Simulation Module Simulate dynamic systems including controllers and plants. Stay in one environment from design to test to implementation LabVIEW user interface to change and observe parameters as simulation or control system is running. Easily create parallel and multirate simulation or control loops.
National Instruments Confidential LabVIEW Simulation Module Simulate dynamic systems including controllers and plants. Stay in one environment from design to test to implementation LabVIEW user interface to change and observe parameters as simulation or control system is running. Easily create parallel and multirate simulation or control loops.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online from Scribd
National Instruments Confidential LabVIEW Simulation Module Simulate dynamic systems including controllers and plants. Stay in one environment from design to test to implementation LabVIEW user interface to change and observe parameters as simulation or control system is running. Easily create parallel and multirate simulation or control loops.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online from Scribd
LabVIEW Simulation Module • Simulate dynamic systems including controllers & plants • Real-time implementation for rapid control prototyping or hardware-in-the-loop simulation
National Instruments Confidential 2
LabVIEW Simulation Module Benefits • Complete simulation and real-time implementation capability - stay in one environment from design to test to implementation • LabVIEW user interface to change and observe parameters as simulation or control system is running • Use any LabVIEW VI or programming structure inside or outside of simulation loops: – Integrated design and simulation, batch simulation – DAQ, RIO, Vision, or CAN for I/O and feedback • Easily create parallel and multirate simulation or control loops
National Instruments Confidential 3
LabVIEW Simulation Module Overview • Linear systems – continuous and discrete time • Nonlinear systems blocks and lookup tables • Signal generation and graphing • Fixed-step, variable step, and stiff solvers • Trimming and linearization • Model hierarchy • Integration with Formula node and MathScript node (through subVI) • Integration with 3D picture control for system visualization
National Instruments Confidential 4
Hardware Options for LV Sim • Offline simulation – desktop computers • Real-time simulation and control: – PXI – Desktop computers – CompactRIO – Compact FieldPoint – Single board computers (SBC) – 32 bit processors w/ LV Embedded (pioneer stage)
National Instruments Confidential 5
Little or No Learning Curve for The Mathworks, Inc. Simulink® Software Users
• LabVIEW Simulation Module
• The Simulink® software environment
Simulink® is a registered trademark
of The MathWorks, Inc.
National Instruments Confidential 6
LabVIEW is the original … Little or No Learning Curve for The MathWorks, Inc. Simulink® Software Users LabVIEW The Simulink® software Simulation Module environment
Debugging and Errors • Create indicator for error output of Simulation Loop • Utilities>>Get Simulation Parameters, create indicator • Execution highlighting • Breakpoints • Probes • Custom probes • Single-stepping
National Instruments Confidential 11
Software Tip for LV Sim
• The parameters for each block can be set to be
set to: – Configuration Dialog Box – Terminal • Allows for parameters to be set through data flow programming and mixing of toolkits and modules in one VI
National Instruments Confidential 12
Simulation Icon Styles • Can change icon style of blocks within simulation loop or subsystem – Static – Dynamic – Text Only – Express • Right-click on block and choose “icon style”
National Instruments Confidential 13
Simulation Timing Capability • Can slow down time to study fast dynamics in detail (collision between two cars) • Can speed up time to study slow dynamics efficiently (temperature control of large water tank) • Can tie simulation time to wall clock (choose auto period) • Finish time can be infinite to allow user to adjust dynamics or control gains as simulation is running
National Instruments Confidential 14
Simulation Exercise I – sw timing
National Instruments Confidential 15
Simulation Exercise II – hw timing
National Instruments Confidential 16
Simulation Exercise III - hw timing w delay
National Instruments Confidential 17
Ordinary Differential Equation (ODE) Solvers • ODE solvers approximate solution to continuous time systems described by differential equations • Considerations in choosing solver: – Accuracy vs computational speed dy • High-order ODE solvers more accurate f (t , y ) • Low-order ODE solvers are faster dt – Fixed time step vs. variable time step y (t0 ) y0 • Variable time step are faster • Fixed time step recommended for real-time implementation – Stiff systems (transients vary more quickly than problem solution) • dt is step size of ODE solver
Simulation Discontinuities • ODE solvers assume that signals and derivatives of signals are continuous • Discontinuities in nonlinear and discrete systems are accounted for by LV Sim • For other discontinuities, use Detect Zero Crossing function or configure Integrator function to reset when signal crosses zero
National Instruments Confidential 20
Continuous Linear Systems
• Following models supported:
– State space – Transfer function – Zero pole gain • Integrator • Derivative • Transport Delay
National Instruments Confidential 21
Discrete Linear Systems • Following discrete models supported: – State space – Transfer function – Zero pole gain • Discrete Integrator • Discrete Derivative • Discrete Zero Order Hold • Discrete First Order Hold • Discrete Filter
National Instruments Confidential 22
Nonlinear Systems and Lookup Tables • Backlash • Dead Zone • Friction • Quantizer • Rate Limiter • Relay • Saturation • Switch • Detect Zero Crossing
• Lookup Tables (1,2, & 3D)
National Instruments Confidential 23
Signal Arithmetic • Gain – Reverse direction • Summation – Change signs – Add or null inputs – Change shape • Multiplication – Can add inputs – Change shape
National Instruments Confidential 24
Exercise: Formula Node & Prog Structures for Phase Plane Analysis
National Instruments Confidential 25
LabVIEW for Design, Prototype and Deploy LabVIEW conditional compiling technology provides for: – Model reuse – Test reuse RCP Target
Embedded Target
HIL Target
National Instruments Confidential 26
Demonstration: CompactRIO demo with LabVIEW Simulation Module and RIO I/O Real-Time
FPGA
National Instruments Confidential 27
Implementation Choices
• LabVIEW Control Design Toolkit Implementation
VIs running in Timed Loop • LabVIEW Simulation Module