National Instruments PID Control Toolkit 371685C-01 User Manual
National Instruments PID Control Toolkit 371685C-01 User Manual

National Instruments PID Control Toolkit 371685C-01 User Manual

Pid control toolkit

Advertisement

LabWindows
/CVI
TM
TM
PID Control Toolkit User Manual
LabWindows/CVI PID Control Toolkit User Manual
May 2008
371685C-01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PID Control Toolkit 371685C-01 and is the answer not in the manual?

Questions and answers

Summary of Contents for National Instruments PID Control Toolkit 371685C-01

  • Page 1 LabWindows /CVI PID Control Toolkit User Manual LabWindows/CVI PID Control Toolkit User Manual May 2008 371685C-01...
  • Page 2 Thailand 662 278 6777, Turkey 90 212 279 3031, United Kingdom 44 (0) 1635 523545 For further support information, refer to the Technical Support and Professional Services appendix. To comment on National Instruments documentation, refer to the National Instruments Web site at and enter ni.com/info the info code feedback ©...
  • Page 3: Important Information

    Instruments Corporation. National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.
  • Page 4: Table Of Contents

    Using the PID Library...3-4 PID Controller ...3-4 Using PID with Autotuning...3-6 Using PID with Gain Scheduling ...3-7 Using PID with Lead-Lag ...3-8 Using PID with Setpoint Profiling ...3-8 Using Ramp Generators ...3-9 © National Instruments Corporation LabWindows/CVI PID Control Toolkit User Manual...
  • Page 5 Contents Converting between Percentage of Full Scale and Engineering Units ... 3-9 Using PID on Real-Time (RT) Targets... 3-10 Using PID with DAQ Devices ... 3-10 Appendix A References Appendix B Technical Support and Professional Services Glossary Index LabWindows/CVI PID Control Toolkit User Manual ni.com...
  • Page 6: About This Manual

    The following documents contain information that you may find helpful as you read this manual: • • • • © National Instruments Corporation ™ LabWindows/CVI PID Control Toolkit Help LabWindows/CVI Help NI-DAQmx Help Traditional NI-DAQ (Legacy) C Function Reference Help ™...
  • Page 7: Overview Of The Pid Control Toolkit

    Windows Explorer, right-click the CD drive icon, and select AutoPlay. On installation startup, the National Instruments PID Control Toolkit screen appears. Click Install Toolkit. In the User Information panel, enter your name and organization and the serial number found on your Certificate of Ownership card.
  • Page 8: Activation Instructions

    Note If your activation was not successful, you can update the serial number, get help from National Instruments, or evaluate the toolkit. Continue to follow the instructions on the screen. When you successfully activate, click Finish. LabWindows/CVI displays a window indicating when this license expires.
  • Page 9: Pid Control

    When applied to the system, the controller output value drives the process variable toward the setpoint value. You can use the PID Control Toolkit functions with National Instruments hardware to develop LabWindows/CVI control applications. Use I/O hardware, such as DAQ devices, FieldPoint I/O modules, or GPIB boards, to connect your PC to the system you want to control.
  • Page 10: Pid Algorithms

    The following formula represents the proportional action. The following formula represents the integral action. The following formula represents the derivative action. © National Instruments Corporation e = SP – PV ⎛ ⎞...
  • Page 11: Implementing The Pid Algorithm With The Pid Functions

    Chapter 2 PID Algorithms Implementing the PID Algorithm with the PID Functions This section describes how the PID Control Toolkit functions implement the fast (positional) PID algorithm. The fast PID algorithm is the default algorithm used in the PID Control Toolkit.
  • Page 12: Gain Scheduling

    Gain scheduling effectively controls a system whose dynamics change with the operating conditions. © National Instruments Corporation if u k ( ) ≥ then u k ( ) if u k ( ) ≤...
  • Page 13: The Precise Pid Algorithm

    Chapter 2 PID Algorithms The Precise PID Algorithm This section describes how the PID Control Toolkit functions implement the precise PID algorithm. Error Calculation The current error used in calculating integral action for the precise PID algorithm is shown in the following formula: where SP is the range of the SP and L is the linearity factor that produces a nonlinear gain...
  • Page 14: Trapezoidal Integration

    In this case, use autotuning. Before you begin autotuning, you must establish a stable controller, even if you cannot properly tune the controller on your own. © National Instruments Corporation e i ( ) e i 1 ∑...
  • Page 15: Tuning Formulas

    Chapter 2 PID Algorithms Figure 2-2 illustrates the autotuning procedure excited by the setpoint relay experiment, which connects a relay and an extra feedback signal with the SP. Notice that the PID Library autotuning functions directly implement this process. The existing controller remains in the loop.
  • Page 16 Table 2-3. Tuning Formula under P-Only Control (Slow) Controller Table 2-4. Tuning Formula under PI or PID Control (Fast) Controller Table 2-5. Tuning Formula under PI or PID Control (Normal) Controller © National Instruments Corporation 0.2K — 0.18K 0.8T 0.25K 0.5T...
  • Page 17 Chapter 2 PID Algorithms Table 2-6. Tuning Formula under PI or PID Control (Slow) Controller Note During tuning, the process remains under closed-loop PID control. It is not necessary to switch off the existing controller and perform the experiment under open-loop conditions.
  • Page 18: Using The Pid Control Toolkit

    © National Instruments Corporation attribute or from the built-in internal timer. By pidAttrDeltaT attribute is set to 1, so the component uses the PidGetAttribute to 0.
  • Page 19: Tuning Controllers Manually

    Chapter 3 Using the PID Control Toolkit Tuning Controllers Manually The following controller tuning procedures are based on the work of Ziegler and Nichols, the developers of the Quarter-Decay Ratio tuning techniques derived from a combination of theory and empirical observations (Corripio 1990). Experiment with these techniques and the process control simulation examples to compare them.
  • Page 20 Table 3-2. Factors for Determining Tuning Parameter Values (Open Loop) Controller PB (Percent) 100 (KT 110 (KT 80 (KT © National Instruments Corporation Figure 3-1. Output and Process Variable Strip Chart Reset (Minutes) — 3.33 T 2.00 T Chapter 3...
  • Page 21: Using The Pid Library

    Chapter 3 Using the PID Control Toolkit Using the PID Library The following sections describe how to use the PID Library to implement a control strategy. PID Controller The PID controller requires several inputs, including SP, PID gains, timer interval (in case the internal timer is not used), PV, and output range.
  • Page 22 To enable output rate limiting, set pidAttrOutputRate controller output, and specify the controller output value on the first iteration of the control loop, respectively. Call attributes. © National Instruments Corporation . The precise PID algorithm implements a PidSetAttribute PidSetProcessVariableFilter to set or get custom filters.
  • Page 23: Using Pid With Autotuning

    Chapter 3 Using the PID Control Toolkit Using PID with Autotuning You can use autotuning to improve controller performance. There are two ways in which you can autotune a controller. • Wizard-Based Autotuning—You can use the PID Autotuning Wizard to tune the parameters.
  • Page 24: Using Pid With Gain Scheduling

    You also can set pidGSAttrSelectionMode manually. By default, the mode is automatic. © National Instruments Corporation CVIPIDRuntime.msm attribute to set the gain scheduling criteria. PidGetGainScheduleAttribute...
  • Page 25: Using Pid With Lead-Lag

    Chapter 3 Using the PID Control Toolkit Using PID with Lead-Lag The lead-lag compensator uses a positional algorithm that approximates a true exponential lead-lag. Feed forward control schemes often use this kind of algorithm as a dynamic compensator. Using lead-lag, you can simulate inertia of motors, slow settling times in pipes, and so on.
  • Page 26: Converting Between Percentage Of Full Scale And Engineering Units

    PID algorithm. The controller gain relates the output in engineering units to the input in engineering units. For example, a gain © National Instruments Corporation to create a setpoint profile. Use a pair of time and to set the setpoint profile attributes.
  • Page 27: Using Pid On Real-Time (Rt) Targets

    Chapter 3 Using the PID Control Toolkit value of 1 produces an output of 10 for a difference between the SP and PV of 10, regardless of the output range and setpoint range. Using PID on Real-Time (RT) Targets Some PID applications are deterministic and, therefore, cannot be run on desktop operating systems.
  • Page 28 For more information about DAQ, refer to the NI-DAQmx Help or Traditional NI-DAQ (Legacy) C Function Reference Help, depending on the DAQ API you are using. Also refer to the DAQ example programs. © National Instruments Corporation Chapter 3 Using the PID Control Toolkit...
  • Page 29 The following material is referenced in this manual: Corripio, A. B. 1990. Tuning of Industrial Control Systems. Raleigh, North Carolina: ISA. Ziegler, J. G. and N. B. Nichols. 1942. “Optimum Settings for Automatic Controllers.” Trans. ASME 64:759–68. © National Instruments Corporation LabWindows/CVI PID Control Toolkit User Manual...
  • Page 30: Technical Support And Professional Services

    Technical Support and Professional Services Visit the following sections of the award-winning National Instruments Web site at • • • © National Instruments Corporation for technical support and professional services: ni.com Support—Technical support resources at the following: – Self-Help Technical Resources—For answers and solutions,...
  • Page 31 Appendix B Technical Support and Professional Services If you searched your local office or NI corporate headquarters. Phone numbers for our worldwide offices are listed at the front of this manual. You also can visit the Worldwide Offices section of office Web sites, which provide up-to-date contact information, support phone numbers, email addresses, and current events.
  • Page 32 A quantity or condition that is varied as a function of the actuating error signal so as to change the value of the directly controlled variable. cycle time The time between samples in a discrete digital control system. © National Instruments Corporation to use this feature. LabWindows/CVI PID Control Toolkit User Manual...
  • Page 33 Glossary damping The progressive reduction or suppression of oscillation in a device or system. dead time (T The interval of time, expressed in minutes, between initiation of an input change or stimulus and the start of the resulting observable response. derivative (control) Control response to the time rate of change of a variable.
  • Page 34 Milliseconds. noise In process instrumentation, an unwanted component of a signal or variable. Noise may be expressed in units of the output or in percent of output span. © National Instruments Corporation LabWindows/CVI PID Control Toolkit User Manual Glossary...
  • Page 35 Glossary output limiting Preventing a controller’s output from traveling beyond a desired maximum range. overshoot The maximum excursion beyond the final steady-state value of output as the result of an input change. Proportional. Proportional, derivative. Proportional, integral. Proportional, integral, derivative. PID control A common control strategy in which a process variable is measured and compared to a desired setpoint to determine an error signal.
  • Page 36 The time during which the controller output is saturated at the maximum or minimum value. The integral action of a simple PID controller continues to increase (wind up) while the controller is in the windup area. © National Instruments Corporation LabWindows/CVI PID Control Toolkit User Manual Glossary...
  • Page 37 2-1 gain, 2-1 output, 2-2 PID, 1-3 conventions used in the manual, vii Corripio, A.B., A-1 © National Instruments Corporation DAQ devices, using PID with, 3-10 derivative action, 2-1 derivative time, 2-1 diagnostic tools (NI resources), B-1 distributing applications, 3-6...
  • Page 38 2-1 integral time, 2-1 KnowledgeBase, B-1 lag compensation, 3-8 lead compensation, 3-8 lead-lag compensator, 3-8 National Instruments support and services, B-1 Nichols, N.B., A-1 nonlinear adjustment of integral action, 2-2, 2-5 open-loop tuning procedure, 3-3 output limiting, 2-3...
  • Page 39 (NI resources), B-1 tuning procedure closed loop, 3-2 open loop, 3-3 step test, 3-3 ultimate gain, 3-2 © National Instruments Corporation ultimate gain tuning procedure, 3-2 Web resources, B-1 windup, 2-3 wizard-based autotuning, 3-6 distributing applications, 3-6 Ziegler, J.G., A-1...

This manual is also suitable for:

Labwindows/cvi

Table of Contents