Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Flexible tools for Interactive Model-Based Control Design and Simulation Massimiliano Banfi National Instruments - System Engineer Roma 29-03-2007."— Presentation transcript:

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

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

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

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

5 Modeling and Design Modeling and design produce controller and plant models K c Controller K p Plant Error Control Output FeedbackSetpoint

6 Rapid Control Prototyping (RCP) Creating a functional prototype of the controller K c Controller K p Plant Error Control Output FeedbackSetpoint

7 Targeting Production Controller Download control algorithm to production embedded target K c Controller K p Plant Error Control Output FeedbackSetpoint

8 Hardware-in-the-Loop (HIL) Simulation Testing production controller with simulated plant K c Controller K p Plant Error Control Output Feedback Setpoint

9 System Testing K c Controller K p Plant Error Control Output Feedback Setpoint

10 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

11 NI Platform for Control LabVIEW Development Environment Control Design ToolkitSystem ID ToolkitSimulation Module LabVIEW Real-TimeLabVIEW FPGA cRIO, cFP PXIRIO/DAQ Devices Targets State Diagram Toolkit Simulation Interface Toolkit PID & Fuzzy Logic Toolkit NI Motion Control LabVIEW Embedded 32-Bit  p

12 PXI Platform for Real-Time 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 3 rd party module support with NI-VISA –Reflective memory, Mil Std 1553 Bus Interface, IRIG B/Telemetry Board, Syncro/Resolvers, Serial Sync Board 3 rd party local displays with serial drivers –NI Touch Panel Computer, QSI, Viewpoint

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

14 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

15 Field Programmable Gate Array (FPGA) CONFIGURABLE LOGIC BLOCK (CLB) PROGRAMMABLE INTERCONNECT I/O BLOCK Source: Xilinx 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.

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

17 Step 1. Plant Modeling and Analysis Option A. Existing Model Option B. Mathematical Modeling Option C. System Identification K c Controller K p Plant Error Motor Voltage Actual Speed Speed Setpoint

18 DC Motor Model Note: Assume L (inductance) and b (rotational friction) are very small 1234 5 Laplace transform: 6

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

20 Analyzing the Plant Model Time Response (Step Response) Frequency Response (Bode Plot) Pole-Zero Map PropertySymbolUnitsDatasheet Value Measured Value ResistanceROhms7.387.96 InductanceLH4.64e-36.11e-3 Rotor InertiaJkg-m 2 1.9e-616e-6 Friction Torque ConstantBN-m-s1.8e-6 Back-EMF Constant Ke V/rad/s3.11e-23.12e-2 Torque Constant Kt N-m/A3.11e-2 Diode Threshold Voltage Vth V0.70.8

21 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

22 Step 1. Plant Modeling and Analysis Option A. Existing Model Option B. Mathematical Modeling Option C. System Identification K c Controller K p Plant Error Motor Voltage Actual Speed Speed Setpoint

23 LabVIEW System Identification Toolkit 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

24 Demonstration: System Identification System Identification Toolkit –Stimulate and measure response –Identify plant model coefficients QETach AO0 Mot Cmd LabVIEW System ID Toolkit Stimulus Response LabVIEW System ID Toolkit System ID Algorithms SignalsDC Motor Model Demo

25 Step 2. Control Design Many Control Design Options –Focus on Root Locus Method –PID Synthesis K c Controller Error Motor Voltage Actual Speed Speed Setpoint Plant

26 LabVIEW Control Design Toolkit 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...

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

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

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

30 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

31 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, …

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

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

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

35 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 Error Motor Voltage PRODUCTION EMBEDDED CONTROLLER Demo

36 NI LabVIEW Embedded Development Module LabVIEW Embedded Development Module Third party toolchain Third party OS 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

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

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

39 LabVIEW for Design, Prototype, and Deploy LabVIEW conditional compiling technology provides for: –Model reuse –Test reuse RCP Target HIL Target Embedded Target

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

41 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.

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

43 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. All other trademarks are the property of their respective owners.

44 LabVIEW is the original … Little or No Learning Curve for The MathWorks, Inc. Simulink ® Software Users The Simulink Software Environment LabVIEW Simulation Module

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

46 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.

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

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

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

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

51 MicroNova CAN (FPGA to cRIO Expansion Chassis)

52 Lockheed Martin Simulator (PXI, LabVIEW Real-Time, SIT, VISA) Application –Prototype integrated avionics unit in XSS-11 –Create hardware-in-the-loop/HIL simulator to test LIDAR (light detection and ranging system) controller Key points –LabVIEW and NI hardware provide future flexibility –NI helped create an interface to a third-party synchronous serial interface using NI-VISA

53 Siemens Power HIL (Hardware-in-the-Loop) Simulation Actual Turbine Controller Steam Turbine Simulator PXI RT System Monitor Host and Server I/O Signals

54 White Goods LabVIEW Real-Time, DAQ, and Simulink models through the Simulation Interface Toolkit (SIT) are used in the design and test of appliances.

55 NI Benefits Software –One graphical programming approach for Windows, Real-Time, FPGA, Prototypes, Embedded, Distributed & Control Design I/O –Breadth: plug-in and distributed –Price and Value Openness –Software (e.g. DLL, SIT, ActiveX/COM,.NET, IVI, OPC, LabVIEW Tools Network) –Hardware (e.g. CompactRIO Modules, PXI based on CompactPCI, PCIExpress) –Virtual Instrumentation means to be able to do full systems in some cases and integrate with others in other cases (e.g. when other products are already in use)

56 Discuss products and configure your application Obtain estimated costs or a quote to take with you Request a free consultation – an NI engineer will come to your office to: –Discuss your application and specialized topics –Demonstrate customized applications, examples, and products Schedule an onsite seminar at your location Visit the web site: www.ni.com\design


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

Similar presentations


Ads by Google