MAY-JUN 2017

Issue link:

Contents of this Issue


Page 36 of 53

INTECH MAY/JUNE 2017 37 it, but a look at the PID equation can be helpful when tuning a loop. The PID equation and the following discus- sion is for basic reference only. Extensive analy- sis of this and similar equations is available in a variety of process control textbooks. Addition - ally, some PID controllers allow selection of the algorithm type, most commonly position or ve locity. The position algorithm is the choice for most applications, such as heating and cool - ing loops, and for position and level control ap plications. Flow control loops typically use a velocity control algorithm. The proportional term (P), often called gain, drives a corrective action proportional to the er- ror. The integral term (I), often called reset, causes changes to the control output proportional to the error over time, specifically, the integral sum of the error values over a period of time. The de- rivative term (D), often called rate, changes the control output proportional to the error rate of change, anticipating error. Using the equation below, a PID controller re- ceives the PV and calculates the corrective action to the control output based on error (proportion- al), the sum of all previous errors (integral), and the error rate of change (derivative). The follow- ing is a discrete position form of a PID equation, where the control output is calculated to respond to displacement of the PV from the SP: M n = K c * e n + Ki * ∑ e i + Kr * (e n – e n − 1 ) +M o where: M n is the control output at the moment of time n. This is the gain or response output, such as 0 –100%, sent to the controlled device. e n is the error at the moment of time n calcu- lated by subtracting the desired set point from the actual process variable (SP – PV n ). K c * e n is the proportional term (P). K c is the proportional gain coefficient and becomes fixed once the proper value is found during tuning. Ki * ∑ n i = 1 e i is the integral term (I). This is the sum of the calculated errors from the first sample (i = 1) to the current moment n multiplied by Ki, the integral coefficient. Ki is calculated using the formula: Ki = K c * sample rate/integral time. Kr * (e n − e n−1 ) is the derivative term (D). It is the error now (e n ) minus the previous sample error (e n−1 ), with the result multiplied by the deriva- tive coefficient Kr, which is calculated using the formula: Kr = Kc * (derivative time/sample rate). The derivative term looks at the error now and the error before. It also determines how rapidly the error is increasing or decreasing, and adjusts the output as needed. M o is the control output initial value. It is also the value transferred if switching from manual to autoloop control. A PI example Applying this PID equation to a tempera- ture control example shows how the P, I, and D terms work together. In this example, an oven is controlled to a desired temperature set point of 350°F (figure 1). As a starting point, the following parameters are used. FAST FORWARD l To reduce process variable error, industry commonly uses PID controllers. l A PID controller receives the process variable from sensors and calcu- lates the corrective action to the control variable (output) based on the error (proportional), the sum of all previous errors (integral), and the error rate of change (derivative). l Many applications run on only PI terms and some on just the P term, so it is common to "disable" parts of the PID equation. (i=1) n SPECIAL SECTION: PROCESS INDUSTRY TRENDS

Articles in this issue

Archives of this issue

view archives of InTech - MAY-JUN 2017