2.0 AUTOMATIC CONTROLLERS. An automatic controller compares the actual value of the plant output with the reference input (desired value), determines the deviation, and produces a control signal that will reduce the deviation to zero or to a small value. The manner in which the automatic controller produces the control signal is called the control action. Figure 1; Block diagram of an industrial control system Figure 1 is a block diagram of an industrial control system, which consists of an automatic controller, an actuator, a plant, and a sensor (measuring element). The controller detects the actuating error signal, which is usually at a very low power level, and amplifies it to a sufficiently high level. The output of an automatic controller is fed to an actuator, such as an electric motor, a hydraulic motor, or a pneumatic motor or valve. (The actuator is a power device that produces the input to the plant according to the control signal so that the output signal will approach the reference input signal.) The sensor or measuring element is a device that converts the output variable into another suitable variable, such as a displacement, pressure, voltage, etc., that can be used to compare the output to the reference input signal. This element is in the feedback path of the closed-loop system. The set point of the controller must be converted to a reference input with the same units as the feedback signal from the sensor or measuring element. 2.1 PID CONTROLLERS One form of controller widely used in industrial process control is called a three term, or PID controller. This controller has a transfer function 1 G C (s ) K P KI s KDs The controller provides a proportional term, an integration term and a derivative term. The equation for the output in the time domain is u (t) K P e (t) K I e (t) d t K d e (t) D dt The three mode controller is also called a PID controller because it contains a proportional, an integral and a derivative term. The transfer function of the derivative term is actually G d (s) KDs ds1 but d is usually much smaller than the time constants of the process itself, so it may be neglected. Setting K D = 0, then we have the proportional plus integral (PI) controller. G c (s ) K P When K I KI s = 0, we have G c (s) K P KDs which is called a proportional plus derivative (PD) controller. Many industrial processes are controlled using proportional-integral-derivative (PID) controllers. The popularity of PID controllers can be attributed partly to their good performance in a wide range of operating conditions and partly to their functional simplicity, which allows engineers to operate them in a simple, straightforward manner. To implement such a controller, three parameters must be determined for the given process: proportional gain, integral gain, and derivative gain. 2.1.1 INTRODUCTION TO PID CONTROLLERS. As described earlier, a Controller is provided to modify the error signal for better control actions. 2.1.2 PID Control. Introduction. PID is an acronym for Proportional, Integral and Derivative. PID controller is a popular practical feedback controller structure with three adjustable parameters. It is called a PID controller because it contains a Proportional (P), an Integral (I), and a Derivative (D) term hence PID. The output is the sum of the three terms with an adjustable gain for each term as shown in Figure 1. 2 Figure 2; Block diagram representing a PID parameters It is the most commonly used in many industrial processes. The popularity of PID controllers can be attributed partly to their good performance in a wide range of operating conditions and partly to their functional simplicity, which allows engineers to operate them in a simple, straight forward manner. A PID controller calculates an error value as the difference between a measured process variable and a desired set point. The controller attempts to minimize the steady state error by adjusting the process control inputs. The three parameters can be interpreted in terms of time i.e. the present error, accumulation of past errors and prediction of future errors based on current rate of change. As shown in Figure 1; A PID has a transfer function; Gc (s) = Kp + 𝐊𝐈 𝒔 + KDs. …………………………………. (i) Where; GC (s) – Controller output. KP – Proportional gain, tuning parameter. KI - Integral gain, tuning parameter. KD - Derivative parameter, tuning parameter. s - Laplace operator. To implement such a controller, three parameters must be determined for the given process: Proportional gain KP, integral gain KI and derivative gain KD. By tuning the three parameters the controller can provide control action designed for specific requirements. An application example is as shown in figure 2 below. 3 Figure 3; Application of a PID controller on a plant (Load.) The response of the controller can be described in terms of the responsiveness of the controller to an error, the degree to which the controller overshoots the set point and the degree of system oscillation. Set point is the reference value. The equation for the output in the time domain is given by; u(t) = KP ɛ(t) + KI ɛ(𝒕)𝒅𝒕 + KD 𝒅ɛ (𝒕) 𝒅𝒕 . ………………………………… (ii) Where; u – Control signal. ɛ – Control error. [Set point – input.] Equation (ii), shows that the control signal is thus a sum of three terms, the P-term which is proportional to the error; the I-term which is proportional to the integral of the error; D-term which is proportional to the derivative of the error. The controller parameters are KP, KI, and KD as described in equation (i). If KD is set to zero, we have equation (i) becomes; 𝐊 Gc (s) = Kp + 𝒔𝐈 ………………………………………………. (iii), This is called Proportional plus Integral (PI) controller When KI = 0; Gc (s) = Kp + KDs. ……………………………………….……....(iv), This is called a Proportional plus Derivative (PD) controller. 4 2.2 HOW PID LOOP WORKS. As discussed above, PID is an acronym for Proportion, Integral and Derivative. Considering a control loop of error, ɛ, the sum of error under each of the terms is given as; ɛKP (t), for a proportional term. KI ɛdt, for the Integral term. 𝒅𝒆 (𝒕) KD 𝒅𝒕 , for the derivative term. Error can be positive or negative. The three controller components create output based on measured error of the process being regulated. If a control loop functions properly, any changes in error caused by set point changes or process disturbances are quickly eliminated by the combination of the three factors P, I, and D. 2.2.1 Proportional Factor. The output of the proportional factor is the product of gain, KP and measured error, ɛ. Hence it implies that a larger proportional gain or error means a greater output from the proportional factor. Setting the proportional gain too high causes a controller to repeatedly overshoot the set point hence oscillation. The limitation is that when the error is too small, loop output becomes negligible thus even when the proportional loop reaches steady state, there is still error. The larger the proportional gain the smaller the steady state error. But the larger the proportional gain the more likely the loop is to become unstable. This leads to an inevitable steady state error known as offset. 2.2.2 Integral Factor. This is meant to eliminate steady state offset. Integral action guarantees that the process output agrees with the reference in steady state. The limitation is that it strongly contributes to controller output overshoot past the target set point. The shorter the integral time the more aggressively the integral term works. 2.2.3 Derivative factor. This is the least understood and used of the three factors. Most of the PIDs in use are of PI loops. However, this does not mean that it is not used. The proportional corrects instances of error, the integral corrects accumulation of error, and the derivative corrects present error versus error the last time it was checked. The derivative looks at the rate of change of error i.e. Δɛ. The more error changes or the longer the derivative time, the larger the derivative factor becomes. It is meant to counter the effect of overshoot caused by P and I factors. When the error is large, the P and I will push the controller output. This controller response makes error change quickly which in turn causes the derivative to counter the P and I. A well used derivative allows for more aggressive proportional and integral factors. 5 2.3 FUNCTIONING OF CONTROLLERS: The PID controller looks at the current value of an error, ɛ the integral of the error over a time interval ɛ , and the rate of change of the error, Δɛ to determine how much of a correction to apply. The controller continues to apply the correction until change is seen on the feedback. The PID controller is meant to force the feedback match a set point. Causes of errors: i. ii. Set point change. Disturbances in the measured feedback. 2.4 TUNING A CONTROL LOOP. Tuning refers to the adjustment of control parameters, (gain/proportional band, integral gain/reset, derivative gain/rate) to optimum values for a target response. It is part of loop design, required if the system oscillates too much, responds too slowly, has steady-state error, or is unstable. However, one must check the hardware first as it could be the problem not the controller. A PID most likely needs tuning if; The operator thinks it can perform better. Process dynamics were not well understood when gains were first set. Dynamics were changed. Some control system characteristics are direction dependent. Careful consideration was not given to the units of gains and other parameters. 2.4.1 Methods of tuning a PID loop. There are several methods of tuning a PID loop depending on whether the loop can be taken offline for tuning and the system response speed. a) Subjecting the system to a step change in input, measuring output as a function of time and using this response to determine control parameters. b) The Ziegler-Nichols method; this involves setting I and D gains to Zero and then increasing P gain until the loop output starts to oscillate. c) Use of optimization software. This can be done even offline. The software packages gather data, develop process models, suggest optimal tuning, and even develop tuning. d) Tuning by feel. This is an online method which is erratic, not repeatable and can be inefficient. e) Cohen-Coon method, an offline method modified from the Ziegler-Nicholas approach. It involves some math and good for first order process. Under manual mode, wait until the process is at a steady state before introducing a step change in the input. From the measurements based on the step test, evaluate the process parameters. We will discuss extensively on tuning, design using Matlab and domain description. 2.5 Limitations of PID controllers; 6 i. ii. iii. iv. v. 2.6 The overall performance is reactive and therefore a compromise since it is a feedback system with constant parameters and no direct knowledge of the process. Better performance can be obtained by incorporating a model of the process. Can give poor performance when used alone, loop gains must be reduced so that the control system does not overshoot, oscillate or hunt about the control set point value. They also have difficulties in the presence of non-linearities, may trade-off regulation versus response time, PID’s do not react to changing process behavior for instance a change in the process after it has warmed up. They lag in responding to large disturbances. Domain Specifications. Frequently, the performance characteristics of a control system are specified in terms of the transient response to a unit-step input, since it is easy to generate and is sufficiently drastic. (If the response to a step input is known, it is mathematically possible to compute the response to any input.) The transient response of a system to a unit-step input depends on the initial conditions. For convenience in comparing transient responses of various systems, it is a common practice to use the standard initial condition that the system is at rest initially with the output and all time derivatives thereof zero. Then the response characteristics of many systems can be easily compared. The transient response of a practical control system often exhibits damped oscillations before reaching steady state. In specifying the transient-response characteristics of a control system to a unit-step input, it is common to specify the following: Delay time, td Rise time, tr Peak time, tp Maximum overshoot, Mp Settling time, ts 7 Figure 4: Domain performance specifications. Rise time (tr)- The time taken for response to raise from 0% to 100% for the very first time is rise time. Delay time (td) - The time taken for response to reach (half the final value) 50% of final value for the very first time is delay time. Peak time (tp) - The time taken for the response to reach the peak value for the first time is peak time. (or the time required for the response to reach the first peak of the overshoot.) Maximum Overshoot - Peak overshoot is defined as the ratio of maximum peak value measured from the maximum value to final value. Settling time (ts) - Settling time is defined as the time taken by the response to reach and stay within specified error. Usually 2 - 5%. Transient response - The transient response is the response of the system when the system changes from one state to another. Steady state - The steady state response is the response of the system when it approaches infinity. Steady state error - The steady state error is defined as the value of error as time tends to infinity. The time-domain specifications just given are quite important, since most control systems are timedomain systems; i.e. they must exhibit acceptable time responses. (This means that, the control system must be modified until the transient response is satisfactory.) 8