National Instruments LabWindows/CVI User Manual - The Precise Pid Algorithm

Manual is about: PID Control Toolkit

Summary of LabWindows/CVI

  • Page 1

    Labwindows tm /cvi tm pid control toolkit user manual labwindows/cvi pid control toolkit user manual may 2008 371685c-01.

  • Page 2

    Support worldwide technical support and product information ni.Com national instruments corporate headquarters 11500 north mopac expressway austin, texas 78759-3504 usa tel: 512 683 0100 worldwide offices australia 1800 300 800, austria 43 662 457990-0, belgium 32 (0) 2 757 0020, brazil 55 11 3262 3...

  • Page 3: Important Information

    Important information warranty the media on which you receive national instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. Nati...

  • Page 4: Contents

    © national instruments corporation v labwindows/cvi pid control toolkit user manual contents about this manual conventions ...................................................................................................................Vii related documentation........................................

  • Page 5

    Contents labwindows/cvi pid control toolkit user manual vi ni.Com 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 ............................

  • Page 6: About This Manual

    © national instruments corporation vii labwindows/cvi pid control toolkit user manual about this manual the labwindows/cvi pid control toolkit user manual describes the pid control toolkit for labwindows ™ /cvi ™ . The manual describes the features, functions, and operation of the toolkit. To use th...

  • Page 7: Overview of The Pid Control

    © national instruments corporation 1-1 labwindows/cvi pid control toolkit user manual 1 overview of the pid control toolkit this chapter describes how to install the toolkit and describes proportional-integral-derivative (pid) control applications. System requirements your computer must meet the fol...

  • Page 8: Activation Instructions

    Chapter 1 overview of the pid control toolkit labwindows/cvi pid control toolkit user manual 1-2 ni.Com activation instructions the first time you launch labwindows/cvi after installing the pid control toolkit, you are prompted to activate the toolkit. Complete the following steps to activate the pi...

  • Page 9: Pid Control

    Chapter 1 overview of the pid control toolkit © national instruments corporation 1-3 labwindows/cvi pid control toolkit user manual pid control currently, the pid algorithm is the most common control algorithm used in industry. Often, pid is used to control processes that include heating and cooling...

  • Page 10: Pid Algorithms

    © national instruments corporation 2-1 labwindows/cvi pid control toolkit user manual 2 pid algorithms this chapter explains the fast pid, precise pid, and autotuning algorithms. The pid algorithm the pid controller compares the setpoint (sp) to the process variable (pv) to obtain the error ( e ), a...

  • Page 11

    Chapter 2 pid algorithms labwindows/cvi pid control toolkit user manual 2-2 ni.Com 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...

  • Page 12

    Chapter 2 pid algorithms © national instruments corporation 2-3 labwindows/cvi pid control toolkit user manual output limiting the actual controller output is limited to the range specified for control output, as follows: and the following formula shows the practical model of the pid controller. The...

  • Page 13: The Precise Pid Algorithm

    Chapter 2 pid algorithms labwindows/cvi pid control toolkit user manual 2-4 ni.Com 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 a...

  • Page 14: The Autotuning Algorithm

    Chapter 2 pid algorithms © national instruments corporation 2-5 labwindows/cvi pid control toolkit user manual trapezoidal integration trapezoidal integration is used to avoid sharp changes in integral action when there is a sudden change in the pv or sp. The following formula represents the trapezo...

  • Page 15

    Chapter 2 pid algorithms labwindows/cvi pid control toolkit user manual 2-6 ni.Com 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 impl...

  • Page 16

    Chapter 2 pid algorithms © national instruments corporation 2-7 labwindows/cvi pid control toolkit user manual table 2-2. Tuning formula under p-only control (normal) controller k c t i t d p 0.2 k u — — pi 0.18 k u 0.8 t u — pid 0.25 k u 0.5 t u 0.12 t u table 2-3. Tuning formula under p-only contr...

  • Page 17

    Chapter 2 pid algorithms labwindows/cvi pid control toolkit user manual 2-8 ni.Com 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. In the setpoint relay experiment,...

  • Page 18: Designing A Control Strategy

    © national instruments corporation 3-1 labwindows/cvi pid control toolkit user manual 3 using the pid control toolkit this chapter contains the basic information you need to design a control strategy using the pid control toolkit functions. Designing a control strategy when you design a control stra...

  • Page 19

    Chapter 3 using the pid control toolkit labwindows/cvi pid control toolkit user manual 3-2 ni.Com 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 combinatio...

  • Page 20

    Chapter 3 using the pid control toolkit © national instruments corporation 3-3 labwindows/cvi pid control toolkit user manual open-loop (step test) tuning procedure the open-loop (step test) tuning procedure assumes that you can model any process as a first-order lag and a pure deadtime. This method...

  • Page 21: Using The Pid Library

    Chapter 3 using the pid control toolkit labwindows/cvi pid control toolkit user manual 3-4 ni.Com 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, time...

  • Page 22

    Chapter 3 using the pid control toolkit © national instruments corporation 3-5 labwindows/cvi pid control toolkit user manual the fast pid algorithm is faster and simpler than the precise pid algorithm. Use the fast algorithm in fast control loops. The precise pid algorithm uses the two degree of fr...

  • Page 23

    Chapter 3 using the pid control toolkit labwindows/cvi pid control toolkit user manual 3-6 ni.Com 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 w...

  • Page 24

    Chapter 3 using the pid control toolkit © national instruments corporation 3-7 labwindows/cvi pid control toolkit user manual if you are using labwindows/cvi 8.0 and later, click add additional module in the drivers & components tab of the edit installer dialog box. In the select merge module dialog...

  • Page 25

    Chapter 3 using the pid control toolkit labwindows/cvi pid control toolkit user manual 3-8 ni.Com 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 com...

  • Page 26

    Chapter 3 using the pid control toolkit © national instruments corporation 3-9 labwindows/cvi pid control toolkit user manual you can use the setpoint profiler as follows: 1. Call pidsetpointprofilecreate to create a setpoint profile. Use a pair of time and setpoint value arrays to specify the setpo...

  • Page 27

    Chapter 3 using the pid control toolkit labwindows/cvi pid control toolkit user manual 3-10 ni.Com 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 determ...

  • Page 28

    Chapter 3 using the pid control toolkit © national instruments corporation 3-11 labwindows/cvi pid control toolkit user manual the control loops can be timed in the following ways: • software-timed —in software-timed control loops, the timing is controlled by the software loop rate. You can implemen...

  • Page 29: References

    © national instruments corporation a-1 labwindows/cvi pid control toolkit user manual a references the instrument society of america (isa), the organization that sets standards for process control instrumentation in the united states, offers a catalog of books, journals, and training materials to te...

  • Page 30: Technical Support and

    © national instruments corporation b-1 labwindows/cvi pid control toolkit user manual b technical support and professional services visit the following sections of the award-winning national instruments web site at ni.Com for technical support and professional services: • support —technical support ...

  • Page 31

    Appendix b technical support and professional services labwindows/cvi pid control toolkit user manual b-2 ni.Com if you searched ni.Com and could not find the answers you need, contact your local office or ni corporate headquarters. Phone numbers for our worldwide offices are listed at the front of ...

  • Page 32: Glossary

    © national instruments corporation g-1 labwindows/cvi pid control toolkit user manual glossary a algorithm a prescribed set of well-defined rules or processes for the solution of a problem in a finite number of steps. Autotuning automatically testing a process under control to determine the controll...

  • Page 33

    Glossary labwindows/cvi pid control toolkit user manual g-2 ni.Com d damping the progressive reduction or suppression of oscillation in a device or system. Dead time (t d ) the interval of time, expressed in minutes, between initiation of an input change or stimulus and the start of the resulting ob...

  • Page 34

    Glossary © national instruments corporation g-3 labwindows/cvi pid control toolkit user manual i instrument society of america (isa) the organization that sets standards for process control instrumentation in the united states. Integral (control) action control action in which the output is proporti...

  • Page 35

    Glossary labwindows/cvi pid control toolkit user manual g-4 ni.Com o 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. P p proportional. Pd pr...

  • Page 36

    Glossary © national instruments corporation g-5 labwindows/cvi pid control toolkit user manual r ramp the total (transient plus steady-state) time response resulting from a sudden increase in the rate of change from zero to some finite value of input stimulus. Reentrant execution mode in which calls...

  • Page 37: Index

    © national instruments corporation i-1 labwindows/cvi pid control toolkit user manual index a applications, 1-3 autotuning, 3-6 classic, 3-6 procedure, 3-6 wizard based, 3-6 distributing applications, 3-6 autotuning algorithm tuning formulas, 2-6 pi control (fast), 2-7 pi control (normal), 2-7 pi co...

  • Page 38

    Index labwindows/cvi pid control toolkit user manual i-2 ni.Com i installation instructions, 1-1 instrument drivers (ni resources), b-1 integral action, 2-1 integral time, 2-1 k knowledgebase, b-1 l lag compensation, 3-8 lead compensation, 3-8 lead-lag compensator, 3-8 n national instruments support...

  • Page 39

    Index © national instruments corporation i-3 labwindows/cvi pid control toolkit user manual s setpoint, 1-3 relay experiment, 2-6 software (ni resources), b-1 step test tuning procedure, 3-3 support, technical, b-1 system requirements, 1-1 t technical support, b-1 timing information, acquiring, 3-1 ...