Classical PID Controllers Eng R. L. Nkumbwa School of Technology Copperbelt University 2010 PID Controllers This note examines a particular control structure that has become almost universally used in industrial control. It is based on a particular fixed structure controller family, the socalled PID controller family. These controllers have proven to be robust and extremely beneficial in the control of many important applications. PID stands for: – – – 2 P (Proportional) I (Integral) D (Derivative) 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology General Control System Arrangement 3 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology What is Classical Control? 4 Classical control involves the choice of a suitable controller in the transfer function Gc(s) so that closed performance meets the specifications as in figure on the previous slide. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Historical Note 5 Early feedback control devices implicitly or explicitly used the ideas of proportional, integral, and derivative action in their structures. However, it was probably not until Minorsky’s work on ship steering published in 1922, that rigorous theoretical consideration was given to PID control. This was the first mathematical treatment of the type of controller that is now used to control almost all industrial processes. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology The Current Situation 6 Despite the abundance of sophisticated tools, including advanced controllers, the Proportional, Integral, Derivative (PID controller) is still the most widely used in modern industry, controlling more that 95% of closed-loop industrial processes. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology So, what is a Controller? 7 A controller is a device that generates an output signal based on the input signal it receives. The input signal is actually an error signal, which is the difference between the measured variable and the desired value, or set point. See figure below for the Controller. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Heat Exchanger Control System 8 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Structure of a Controller 9 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Structure of a Controller 10 This input error signal represents the amount of deviation between where the process system is actually operating and where the process system is desired to be operating. The controller provides an output signal to the final control element, which adjusts the process system to reduce this deviation. The characteristic of this output signal is dependent on the type, or mode, of the controller. Eng R. L. Nkumbwa, Copperbelt 4/9/2015 University, School of Technology Modes of Controllers 11 The mode of control is the manner in which a control system makes corrections relative to an error that exists between the desired value (set point) of a controlled variable and its actual value. The mode of control used for a specific application depends on the characteristics of the process being controlled. For example, some processes can be operated over a wide band, while others must be maintained very close to the set point. Deviation is the difference between the set point of a process variable and its actual value. This is a key term Eng R. Nkumbwa, Copperbelt used when discussing various modes ofL. control. 4/9/2015 University, School of Technology Four Modes of Controllers Four modes of control commonly used for most applications are: – Proportional (P) Proportional plus Reset (PI) Proportional plus Rate (PD) Proportional plus Reset plus Rate (PID) – Other Authors state it differently as follows – – – 12 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Four Modes of Controllers 13 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Proportional Controllers (P) 14 Each mode of control has characteristic advantages and limitations. The modes of control are discussed in this and the next several sections of this module. In the proportional (throttling) mode, there is a continuous linear relation between value of the controlled variable and position of the final control element. In other words, amount of valve movement is Eng R. L. Nkumbwa, Copperbelt proportional to amount of deviation. 4/9/2015 University, School of Technology Proportional Controllers 15 Three terms commonly used to describe the proportional mode of control are proportional band, gain and offset. Proportional band, (also called throttling range), is the change in value of the controlled variable that causes full travel of the final control element. Gain, also called sensitivity, compares the ratio of amount of change in the final control element to amount of change in the controlled variable. Mathematically, gain and sensitivity are reciprocal to Eng R. L. Nkumbwa, Copperbelt proportional band. 4/9/2015 University, School of Technology Proportional Controllers 16 Offset, also called droop, is deviation that remains after a process has stabilized. Offset is an inherent characteristic of the proportional mode of control. In other words, the proportional mode of control will not necessarily return a controlled variable to its set point. Proportional control is also referred to as throttling control. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Reset or Integral Controller (I) 17 Integral control describes a controller in which the output rate of change is dependent on the magnitude of the input. Specifically, a smaller amplitude input causes a slower rate of change of the output. This controller is called an integral controller because it approximates the mathematical function of integration. The integral control method is also known as Eng R. L. Nkumbwa, Copperbelt reset control. 4/9/2015 University, School of Technology Definition of Integral Control 18 A device that performs the mathematical function of integration is called an integrator. The mathematical result of integration is called the integral. The integrator provides a linear output with a rate of change that is directly related to the amplitude of the step change input and a constant that specifies the function of integration. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Example of an Integral Output for a Fixed Input 19 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Integral Flow Rate Controller 20 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Integral Flow Rate Controller 21 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Properties of Integral Control 22 The major advantage of integral controllers is that they have the unique ability to return the controlled variable back to the exact set point following a disturbance. Disadvantages of the integral control mode are that it responds relatively slowly to an error signal and that it can initially allow a large deviation at the instant the error is produced. This can lead to system instability and cyclic operation. For this reason, the integral control mode is not normally used alone, but is combined with another control mode. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Proportional Plus Reset Control (PI) 23 Proportional plus reset control is a combination of the proportional and integral control modes. This type control is actually a combination of two previously discussed control modes, proportional and integral. Combining the two modes results in gaining the advantages and c o m p e n s a t i n g f o r t h e disadvantages of the two individual modes. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Characteristics of the PI 24 The main advantage of the proportional control mode is that an immediate proportional output is produced as soon as an error signal exists at the controller as shown in Figure below. The proportional controller is considered a fast-acting device. This immediate output change enables the proportional controller to reposition the final control element within a relatively short period of time in response to the error. See below figure for the response of the PI Control 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology 25 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Disadvantages of the Proportional Control 26 The main disadvantage of the proportional control mode is that a residual offset error exists between the measured variable and the set point for all but one set of system conditions. The main advantage of the integral control mode is that the controller output continues to reposition the final control element until the error is reduced to zero. This results in the elimination of the residual offset error allowed by the proportional mode. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Disadvantages of the Proportional Control 27 The main disadvantage of the integral mode is that the controller output does not immediately direct the final control element to a new position in response to an error signal. The controller output changes at a defined rate of change, and time is needed for the final control element to be repositioned. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PI Equations 28 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PI Characteristics 29 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Characteristics of the PI 30 The combination of the two control modes is called the proportional plus reset (PI) control mode. It combines the immediate output characteristics of a proportional control mode with the zero residual offset characteristics of the integral mode. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Example of the PI for the Plant Heat Exchanger 31 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Effects of Disturbance on Reverse Acting Controller 32 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Effects of Disturbance on Reverse Acting Controller 33 By adding the reset action to the proportional action the controller produces a larger output for the given error signal and causes a greater adjustment of the control valve. This causes the process to come back to the set point more quickly. Additionally, the reset action acts to eliminate the offset error after a period of time. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Reset Wind-Up 34 Proportional plus reset controllers act to eliminate the offset error found in proportional control by continuing to change the output after the proportional action is completed and by returning the controlled variable to the set point. An inherent disadvantage to proportional plus reset controllers is the possible adverse effects caused by large error signals. The large error can be caused by a large demand deviation or when initially starting up the system. This is a problem because a large sustained error signal will eventually cause the controller to drive to its limit, and the result is called "reset windup." Because of reset windup, this control mode is not well-suited for processes that are frequently shut down and started up. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Proportional plus Rate control (PD) 35 Proportional plus rate control is a control mode in which a derivative section is added to the proportional controller. Proportional plus rate describes a control mode in which a derivative section is added to a proportional controller. This derivative section responds to the rate of change of the error signal, not the amplitude; this derivative action responds to the rate of change the instant it starts. This causes the controller output to be initially larger in direct relation with the error signal rate of change. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PD Controller 36 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PD Controller 37 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Proportional plus Rate control (PD) 38 The higher the error signal rate of change, the sooner the final control element is positioned to the desired value. The added derivative action reduces initial overshoot of the measured variable, and therefore aids in stabilizing the process sooner. This control mode is called proportional plus rate (PD) control because the derivative section responds to the rate of change of the error signal. Eng R. L. Nkumbwa, Copperbelt 4/9/2015 University, School of Technology Definition of the Derivative Control 39 A device that produces a derivative signal is called a differentiator. Figure below shows the input versus output relationship of a differentiator. The differentiator provides an output that is directly related to the rate of change of the input and a constant that specifies the function of differentiation. The derivative constant is expressed in units of seconds and defines the differential controller Eng R. L. Nkumbwa, Copperbelt 4/9/2015 University, School of Technology output. Derivative Output for a Constant Rate of change 40 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Rate Control Output 41 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Rate Control Output 42 The differentiator acts to transform a changing signal to a constant magnitude signal as shown in Figure above. As long as the input rate of change is constant, the magnitude of the output is constant. A new input rate of change would give a new output magnitude. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Rate Control Output 43 Derivative cannot be used alone as a control mode. This is because a steady-state input produces a zero output in a differentiator. If the differentiator were used as a controller, the input signal it would receive is the error signal. As just described, a steady-state error signal corresponds to any number of necessary output signals for the positioning of the final control Eng R. L. Nkumbwa, Copperbelt element. 4/9/2015 University, School of Technology Rate Control Output 44 Therefore, derivative action is combined with proportional action in a manner such that the proportional section output serves as the derivative section input. Proportional plus rate controllers take advantage of both proportional and rate control modes. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Proportional Action 45 As seen in Figure below, proportional action provides an output proportional to the error. If the error is not a step change, but is slowly changing, the proportional action is slow. Rate action, when added, provides quick response to the error. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology 46 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Example of the Proportional Plus rate Control 47 To illustrate proportional plus rate control, we will use the same heat exchanger process that has been analyzed in previous chapters (see Figure below). For this example, however, the temperature controller used is a proportional plus rate controller. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Proportional Plus rate Control for the Heat Exchanger 48 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Effects of Disturbance 49 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Industrial Applications 50 Proportional plus rate control is normally used with large capacity or slow-responding processes such as temperature control. The leading action of the controller output compensates for the lagging characteristics of large capacity, slow processes. Rate action is not usually employed with fast responding processes such as flow control or noisy processes because derivative action responds to any rate of change in the error signal, including the noise. Proportional plus rate controllers are useful with processes which are frequently started up and shut down because it is not susceptible to reset Engwindup. R. L. Nkumbwa, Copperbelt 4/9/2015 University, School of Technology Proportional Plus Integral Plus Derivative Control (PID) 51 Proportional plus reset plus rate controllers combine proportional control actions with integral and derivative actions. For processes that can operate with continuous cycling, the relatively inexpensive two position controller is adequate. For processes that cannot tolerate continuous cycling, a proportional controller is often employed. For processes that can tolerate neither continuous cycling nor offset error, a proportional plus reset controller can be used. For processes that need improved stability and can Eng R. L. Nkumbwa, tolerate an offset error, a proportional plus rate Copperbelt controller 4/9/2015 University, School of Technology is employed. Proportional Plus Integral Plus Derivative Control (PID) 52 However, there are some processes that cannot tolerate offset error, yet need good stability. The logical solution is to use a control mode that combines the advantages of proportional, reset, and rate action. This chapter describes the mode identified as proportional plus reset plus rate, commonly called Proportional-Integral-Derivative (PID). 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Controller Action 53 When an error is introduced to a PID controller, the controller’s response is a combination of the proportional, integral, and derivative actions, as shown in Figure below. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology 54 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Controller Action 55 Assume the error is due to a slowly increasing measured variable. As the error increases, the proportional action of the PID controller produces an output that is proportional to the error signal. The reset action of the controller produces an output whose rate of change is determined by the magnitude of the error. In this case, as the error continues to increase at a steady rate, the reset output continues to increase its rate of change. The rate action of the controller produces an output whose magnitude is determined by the rate of change. When combined, these actions produce output as Eng R. L. an Nkumbwa, Copperbelt 4/9/2015 University, School of Technology shown in Figure above. Controller Action 56 As you can see from the combined action curve, the output produced responds immediately to the error with a signal that is proportional to the magnitude of the error and that will continue to increase as long as the error remains increasing. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PID Controller Response Curves 57 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PID Response Curves 58 Figure above demonstrates the combined controller response to a demand disturbance. The proportional action of the controller stabilizes the process. The reset action combined with the proportional action causes the measured variable to return to the set point. The rate action combined with the proportional action reduces the initial overshoot and cyclic Eng R. L. Nkumbwa, Copperbelt period. 4/9/2015 University, School of Technology PID Controller 59 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PID Controllers Equations 60 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PID Controller Characteristics 61 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Design of PID Controllers 62 Based on the knowledge of P, I and D – trial and error – manual tuning – simulation 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Tuning of PID Controllers Because of their widespread use in practice, we present below several methods for tuning PID controllers. Actually these methods are quite old and date back to the 1950’s. Nonetheless, they remain in widespread use today. In particular, we will study – – – 63 Ziegler-Nichols Oscillation Method Ziegler-Nichols Reaction Curve Method Cohen-Coon Reaction Curve Method 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Ziegler-Nichols Method 64 Ziegler-Nichols method – based on a open-loop process – based on a critical gain 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Ziegler-Nichols (Z-N) Oscillation Method This procedure is only valid for open loop stable plants and it is carried out through the following steps: – – – 65 Set the true plant under proportional control, with a very small gain. Increase the gain until the loop starts oscillating. Note that linear oscillation is required and that it should be detected at the controller output. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Ziegler-Nichols (Z-N) Oscillation Method – – 66 Record the controller critical gain Kp = Kc and the oscillation period of the controller output, Pc. Adjust the controller parameters according to next slide; there is some controversy regarding the PID parameterization for which the Z-N method was developed, but the version described here is applicable to the parameterization of standard form PID. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Ziegler-Nichols tuning using the oscillation method 67 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Reaction Curve 68 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Reaction Curve Based Methods A linearized quantitative version of a simple plant can be obtained with an open loop experiment, using the following procedure: – – 69 1. With the plant in open loop, take the plant manually to a normal operating point. Say that the plant output settles at y(t) = y0 for a constant plant input u(t) = u0. 2. At an initial time, t0, apply a step change to the plant input, from u0 to u∞ (this should be in the range of 10 to 20% of full scale). 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Reaction Curve Based Methods – – – 70 3. Record the plant output until it settles to the new operating point. Assume you obtain the curve shown on the next slide. This curve is known as the process reaction curve. In the figure on next page, m.s.t. stands for maximum slope tangent. 4. Compute the parameter model as follows 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Plant Response 71 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Plant Response 72 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Z-N Tuning Using Reaction Curve 73 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology PI Z-N Tuned Reaction Curve 74 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Observation 75 We see from the previous slide that the Ziegler-Nichols reaction curve tuning method is very sensitive to the ratio of delay to time constant. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Cohen-Coon Reaction Curve Method 76 Cohen and Coon carried out further studies to find controller settings which, based on the same model, lead to a weaker dependence on the ratio of delay to time constant. 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Cohen-Coon Tuning Reaction Curve 77 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology Lead-Lag Compensators 78 Closely related to PID control is the idea of lead-lag compensation. The transfer function of these compensators is of the form: 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology 79 4/9/2015 Eng R. L. Nkumbwa, Copperbelt University, School of Technology