Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Flexible tools for Interactive Model-Based Control Design and Simulation PowerPoint Presentation
Download Presentation
Flexible tools for Interactive Model-Based Control Design and Simulation

Flexible tools for Interactive Model-Based Control Design and Simulation

560 Views Download Presentation
Download Presentation

Flexible tools for Interactive Model-Based Control Design and Simulation

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Flexible tools for Interactive Model-Based Control Design and Simulation Roma 29-03-2007 Massimiliano Banfi National Instruments - System Engineer

  2. Design Prototype Deploy Graphical System Design Deployable Targets • Rugged deployment platforms • Distributed networking • Human-machine interfaces • Custom designs Interactive Algorithm Design • Control design • Dynamic system simulation • Digital filter design • Advanced mathematics Tight I/O Integration • I/O modules and drivers • COTS FPGA hardware • VHDL and C code integration • Design validation tools

  3. Modeling and Design System Testing Rapid Prototyping Hardware-in-the-Loop Testing Targeting Control Design Process

  4. Modeling and Design Modeling and design produce controller and plant models Control Output Kc Controller Kp Plant Setpoint Error Feedback

  5. Rapid Control Prototyping (RCP) Creating a functional prototype of the controller Control Output Kc Controller Kp Plant Setpoint Error Feedback

  6. Targeting Production Controller Download control algorithm to production embedded target Control Output Kc Controller Kp Plant Setpoint Error Feedback

  7. Hardware-in-the-Loop (HIL) Simulation Testing production controller with simulated plant Control Output Kc Controller Kp Plant Error Feedback Setpoint

  8. System Testing Control Output Kc Controller Kp Plant Error Feedback Setpoint

  9. Today’s Challenges • Modeling and design • Iterative process • Models and design space are complex • Prototypes not readily available at start of process • Model tuning required based on empirical data • Rapid control prototyping and HIL • Hardware platforms are typically high cost and inflexible • Significant development required to move from offline simulation to real-time implementation

  10. NI Platform for Control LabVIEW Development Environment Control Design Toolkit System ID Toolkit Simulation Module State Diagram Toolkit Simulation Interface Toolkit PID & Fuzzy Logic Toolkit NI Motion Control LabVIEW Real-Time LabVIEW FPGA LabVIEW Embedded Targets cRIO, cFP PXI RIO/DAQ Devices 32-Bit mp

  11. I/O connectivity Data acquisition Signal conditioning Dynamic signal acquisition Motion control Image acquisition FPGA Reconfigurable I/O Switching Modular instruments Communication protocols Ethernet Serial GPIB CAN Chassis expansion through MXI 3rd party module support with NI-VISA Reflective memory, Mil Std 1553 Bus Interface, IRIG B/Telemetry Board, Syncro/Resolvers, Serial Sync Board 3rd party local displays with serial drivers NI Touch Panel Computer, QSI, Viewpoint PXI Platform for Real-Time

  12. Connectivity Signal Conditioning  ADC NI CompactRIO Reconfigurable Embedded System Reconfigurable Chassis Real-Time Controller I/O Modules • DC power with redundant supply inputs • 50 G shock • -40 to 70 °C temperature

  13. Field Programmable Gate Array (FPGA) • What it is • A silicon chip with unconnected logic blocks • User can define and redefine functionality • How it works • Define behavior in software • Compile and download to the hardware • When it is used • Low volume applications that cannot afford ASIC fabrication • Designs that require frequent changes or upgrades

  14. Field Programmable Gate Array (FPGA) PROGRAMMABLE INTERCONNECT I/O BLOCK Source: Xilinx CONFIGURABLE LOGIC BLOCK (CLB) Field Programmable Gate Array (FPGA) devices feature a reconfigurable digital circuit architecture with a matrix of Configurable Logic Blocks (CLBs) surrounded by a periphery of I/O Blocks. Signals can be routed within the FPGA matrix in any arbitrary manner by Programmable Interconnect switches and wire routes.

  15. CompactRIO MicroMo Motor Demo Systems NI 9505 Motor Drive Module • Direct connection to NI 9505 motor drive module • Built-in Quadrature encoder (512 CPR) MicroMo 3242 Brushed DC Motor

  16. Step 1. Plant Modeling and Analysis Speed Setpoint Motor Voltage Actual Speed Kc Controller Kp Plant Error • Option A. Existing Model • Option B. Mathematical Modeling • Option C. System Identification

  17. 3 1 2 4 5 6 Laplace transform: DC Motor Model Note: Assume L (inductance) and b (rotational friction) are very small

  18. Laplace transform: 6 Reorganizing Terms 7 Resultant Transfer Function Angular Speed 8 Input Voltage DC Motor Model Cont.

  19. Analyzing the Plant Model • Time Response (Step Response) • Frequency Response (Bode Plot) • Pole-Zero Map

  20. Demonstration: Mathematical Modeling • Modeling in Simulink • Modeling in NI Express Workbench • Transfer Function (State Space, Zero-Pole-Gain) • Modeling in LabVIEW • Transfer Function (State Space, Zero-Pole-Gain) • Time Domain Differential Equation Demo

  21. Step 1. Plant Modeling and Analysis Speed Setpoint Motor Voltage Actual Speed Kc Controller Kp Plant Error • Option A. Existing Model • Option B. Mathematical Modeling • Option C. System Identification

  22. Identify and validate linear models of systems from empirical data Seamless integration with NI I/O Parametric model estimation (both SISO and MIMO) Nonparametric model estimation Recursive model estimation Data preprocessing Model conversion, validation, and presentation Closed-loop system identification with feedback detection Partially known “grey box” system identification LabVIEW System Identification Toolkit

  23. LabVIEW System ID Toolkit LabVIEW System ID Toolkit AO0 Mot Cmd QE Tach Demonstration: System Identification • System Identification Toolkit • Stimulate and measure response • Identify plant model coefficients Signals System ID Algorithms DC Motor Model Stimulus Response Demo

  24. Step 2. Control Design Speed Setpoint Motor Voltage Actual Speed Kc Controller Error • Many Control Design Options • Focus on Root Locus Method • PID Synthesis Plant

  25. Easily create interactive control design and analysis VIs Model construction, conversion, and reduction Time and frequency response Dynamic characteristics Classical control design - root locus, PID, lead/lag ... State-space control and estimation - LQR, LQG, pole placement, Kalman filter ... LabVIEW Control Design Toolkit

  26. LabVIEW Control Design Toolkit LabVIEW System ID Toolkit Demonstration: LabVIEW Control Design LabVIEW Dev Sys Analyze Closed-Loop System DC Motor Model Controller Model LabVIEW Control Design Toolkit Analyze Plant Design Controller Demo

  27. Step 3. Simulation Speed Setpoint Motor Voltage Actual Speed Error • Simulate response to arbitrary inputs (vs. step response, etc.) • Simulate controller with non-linear and/or higher-order plant models Controller Plant

  28. LabVIEW Simulation Module • Simulate dynamic systems including controllers and plants • Real-time implementation for rapid control prototyping or hardware-in-the-loop simulation

  29. LabVIEW Simulation Module Features • Linear systems – continuous and discrete time • Nonlinear system blocks and lookup tables • 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

  30. 3D Picture Control w/ LabVIEW Simulation • Intern project, 2006 • Charles Beaman, UT ME undergrad • Transition into courses taught by Prof. Beaman at UT • Current effort to put on Connexions (Erik Luther) • Can be applied to courses in: • Physics • Intro to Engineering • Dynamic Systems • Controls, …

  31. LabVIEW Simulation Module LabVIEW System ID Toolkit Demontration: LabVIEW Simulation Module Demo LabVIEW Dev Sys Actual Speed LabVIEW Control Design Toolkit Controller Model DC Motor Model LabVIEW Simulation Module Speed Setpoint Demo

  32. Step 4. Control Prototyping RT PXI System/cRIO Speed Setpoint Motor Voltage Actual Speed Electric Motor Error • Prototype controller with real-time hardware • Download control algorithm to RT PXI • Connect to actual plant system (electric motor) Controller Plant

  33. Controller Model DC Motor Model AI Scan LabVIEW RT Demontration: Real-Time Prototyping • Simulation Module and LabVIEW Real-Time • Implement controller on real-time hardware LabVIEW Simulation Module Speed Setpoint Actual Speed LabVIEW Dev Sys AO Update LabVIEW Simulation Module Demo

  34. Step 5. Targeting Production Controller • Production controller with real-world I/O • Download control algorithm to production embedded target • Not connected to real-world plant PRODUCTION EMBEDDED CONTROLLER Motor Voltage Error Demo

  35. NI LabVIEW Embedded Development Module LabVIEW Embedded Development Module • Deploy on any 32-bit processor • Use the same LabVIEW graphical programming to deploy to custom devices • More than 400 built-in numerical analysis and signal processing libraries • Interactive front panel and block diagram debugging • C code generator for breadth of toolchain and target support Third party toolchain Third party OS

  36. Step 6. Hardware-in-the-Loop RT PXI System Speed Setpoint Motor Voltage Actual Speed • Prototype plant with real-time hardware • Download plant model to RT PXI • Connect to production controller Production Controller Error Controller Plant Model

  37. 7. Final Test and Verification Motor Voltage Actual Speed Speed Setpoint Error NI Core!!!

  38. LabVIEW for Design, Prototype, and Deploy LabVIEW conditional compiling technology provides for: • Model reuse • Test reuse RCP Target Embedded Target HIL Target

  39. Benefits of LabVIEW Graphical System Design Configurable Simulation Graphical Dataflow State Diagram Math Script

  40. New LabVIEW MathScript • Powerful textual programming for signal processing, analysis, and math • More than 650 built-in functions • Reuse many of your m-file scripts created with The MathWorks, Inc. MATLAB® software and others • Partially based on original math from NI MATRIXx • A native LabVIEW solution • Interactive and programmatic interfaces • Does not require third-party software MATLAB® is a registered trademark of The MathWorks, Inc. All other trademarks are the property of their respective owners.

  41. Little or No Learning Curve for Customers Familiar with The MathWorks Inc. MATLAB® Language Syntax LabVIEW MathScript Syntax MATLAB ® syntax

  42. Little or No Learning Curve for The MathWorks, Inc. Simulink® Software Users • LabVIEW Simulation Module • The SimulinkSoftware Environment Simulink® is a registered trademark of The MathWorks, Inc. All other trademarks are the property of their respective owners.

  43. LabVIEW is the original …Little orNo Learning Curve for The MathWorks, Inc. Simulink® Software Users LabVIEW Simulation Module The SimulinkSoftware Environment

  44. Convert your plant and controller models developed in The MathWorks, Inc. Simulink® environment into LabVIEW Simulation Module code Simulation Model Conversion

  45. NI LabVIEW Simulation Interface Toolkit (SIT) • Use the LabVIEW Simulation Interface Toolkit to: • Build powerful user interfaces for models developed in the Simulink environment • Interact with, view, and control models from LabVIEW • Deploy models to real-time hardware with LabVIEW Real-Time* *Requires The MathWorks, Inc. Real-Time Workshop® . Real-Time Workshop® is a registered trademark of The MathWorks, Inc. All other trademarks are the property of their respective owners.

  46. SIT Connection Manager LabVIEW Simulation Interface Toolkit (SIT) LabVIEW Front Panel Simulation Model Model Parameters and Signals LabVIEW Controls and Indicators

  47. Design and Analysis Code Generation Prototyping and HIL Testing Simulation The MathWorks MATLAB® Simulink® RTW Xmath System Build AutoCode MATRIXx Control Design Development Paths Math Inter. TK LV Script Node Simulation Interface Toolkit (Future) Simulation Interface TK (Future) LabVIEW RT, Windows LabVIEW LabVIEW LabVIEW Math Inter. TK LV Script Node Simulation Interface Toolkit Simulation Interface Toolkit

  48. References: MicroNova Simulator Ethernet Windows PC (e.g. user interface) Engine signals PXI RT HIL Simulator Engine Control Unit (ECU)

  49. Display elements and connection panel for ECU Realtime computer CAN-card Analog Output MicroNova Motor-HIL-card based on NI FPGA card Power supply MicroNova System Signal conditioning

  50. MicroNova CAN (FPGA to cRIO Expansion Chassis)