Résumé du contenu de la page N° 1
TM TM
LabWindows /CVI
PID Control Toolkit User Manual
LabWindows/CVI PID Control Toolkit User Manual
May 2008
371685C-01
Résumé du contenu de la page N° 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 3599, Canada 800 433 3488, China 86 21 5050 9800, Czech Republic 420 224 235 774, Denmark 45 45 76 26 00, Finland 358 (0) 9 725 72511, France 01 57 66 24 24, Germany 49 89 7413130, India 91 80 411900
Résumé du contenu de la page N° 3
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. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty per
Résumé du contenu de la page N° 4
Contents About This Manual Conventions ...................................................................................................................vii Related Documentation..................................................................................................vii Chapter 1 Overview of the PID Control Toolkit System Requirements ....................................................................................................1-1 Installation Instructions........................
Résumé du contenu de la page N° 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 vi ni.com
Résumé du contenu de la page N° 6
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 this manual, you need a basic understanding of process control strategies and algorithms. Conventions The following conventions appear in this manual: » The » symbol leads you through nested menu items and dialog box options to a final action. The sequence File»Page Setup»Options dir
Résumé du contenu de la page N° 7
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 following minimum system requirements to run the PID Control Toolkit: � LabWindows/CVI 7. x or later � Windows Vista/XP/2000 Installation Instructions If you already have an earlier version of the PID Control Toolkit installed on your computer, you must uninstall it before installing
Résumé du contenu de la page N° 8
Chapter 1 Overview of the PID Control Toolkit 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 PID Control Toolkit. 1. Click Activate Products. 2. Select the Automatically activate through a secure Internet connection option and click Next. Your computer must be connected to the Internet for this option to work. If you do not have Internet access on
Résumé du contenu de la page N° 9
Chapter 1 Overview of the PID Control Toolkit 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 systems, fluid level monitoring, flow control, and pressure control. When using PID control, you must specify a process variable and a setpoint. The process variable is the system parameter you want to control, such as temperature, pressure, or flow rate. The setpoint is the desir
Résumé du contenu de la page N° 10
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), as follows: e = SP – PV Then the PID controller calculates the controller action, u(t), as follows. In this equation, K c is the controller gain. t ⎛⎞ 1 de ⎜⎟ ut () = K e++ -- - - et d T --- -- - c d ∫ ⎜⎟ T dt i ⎝⎠ 0 If the error and the controller output have the same range, –100% to 1
Résumé du contenu de la page N° 11
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. Error Calculation The following formula represents the current error used in calculating proportional, integral, and derivative action, where PV is the filtered process variable. f e(k) = (SP –PV ) f Proportional Action Proportio
Résumé du contenu de la page N° 12
Chapter 2 PID Algorithms Output Limiting The actual controller output is limited to the range specified for control output, as follows: if uk () ≥ u then uk () = u max max and if uk () ≤ u then uk () = u min min The following formula shows the practical model of the PID controller. t dPV 1 f --- - ---- --- ---- - ut () = K() SP –PV + (SP –PV)dt –T c d ∫ T dt i 0 The PID functions use an integral sum correction algorithm that facilitates anti-windup and bumpless manual-to-automatic transfers. W
Résumé du contenu de la page N° 13
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: SP –PV f -- ---- ---- --- ---- ---- --- - e(k) = (SP –PV )(L+1() – L * ) f SP range is the range of the SP and L is the linearity factor that produces a nonlinear gain where SP range term in which the controll
Résumé du contenu de la page N° 14
Chapter 2 PID Algorithms 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 trapezoidal integration action for the precise PID algorithm. Use nonlinear adjustment of integral action to counteract the overshoot. The larger the error, the smaller the integral action, as shown in the following formula and in Figure 2-1. k K c ei () +ei() – 1 1 u() k = --- -- - --- -
Résumé du contenu de la page N° 15
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. SP PV e + + P(I) Controller Process – – Relay Figure 2-2. Process under PID Control with Setpoint Relay For most systems, the nonlinear relay characteristic generates a limiting cycle from
Résumé du contenu de la page N° 16
Chapter 2 PID Algorithms Table 2-2. Tuning Formula under P-Only Control (Normal) Controller K T T c i d P 0.2K — — u PI 0.18K 0.8T — u u PID 0.25K 0.5T 0.12T u u u Table 2-3. Tuning Formula under P-Only Control (Slow) Controller K T T c i d P 0.13K — — u PI 0.13K 0.8T — u u PID 0.15K 0.5T 0.12T u u u Table 2-4. Tuning Formula under PI or PID Control (Fast) Controller K T T c i d P T /τ — — p PI 0.9T /τ 3.33τ — p PID 1.1T /τ 2.0τ 0.5τ p Table 2-5. Tuning Formula under PI or PID Control (Norma
Résumé du contenu de la page N° 17
Chapter 2 PID Algorithms Table 2-6. Tuning Formula under PI or PID Control (Slow) Controller K T T c i d P 0.26T /τ — — p PI 0.24T /τ 5.33τ — p PID 0.32T /τ 4.0τ 0.8τ p 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, the SP signal mirrors the SP for the PID controller. LabWindows/CVI PID Control Toolkit User Manual 2-8 ni.co
Résumé du contenu de la page N° 18
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 strategy, sketch a flowchart that includes the physical process and control elements such as valves and measurements. Add feedback from the process and any required computations. Then use the PID Control Toolkit functions to translate the flowchart into an application. You can handle t
Résumé du contenu de la page N° 19
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. For different processes, one method might be easier or more accurate than another. For example, some tec
Résumé du contenu de la page N° 20
Chapter 3 Using the PID Control Toolkit 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 requires more analysis than the closed-loop tuning procedure, but the process does not need to reach sustained oscillation. Therefore, the open-loop tuning procedure might be quicker and more reliable for many processes. Observe the output and the PV on a strip chart that shows ti