0% found this document useful (0 votes)
79 views

PID Controller

PID

Uploaded by

kunal13
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
79 views

PID Controller

PID

Uploaded by

kunal13
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 35
Chapter 10 PID Controls 10.1 Introduction - More than half of the industrial controllers in use today utilize PID or modified PID control schemes. - Many different types of tuning rules have been proposed in the literature. = Manual tuning on-site = On-line automatic tuning = Gain scheduling - When the mathematical model of the plant is not known and therefore analytical design methods cannot be used, PID controls prove to be most useful. 10-2 TUNING RULES FOR PID CONTROLLERS: PID Control of Plants. Figure 10-1 PID control of a plant. Design PID control - Know mathematical model ~ various design techniques - Plant is complicated, can’t obtain mathematical model ~ experimental approaches to the tuning of PID controllers Ziegler-Nichols Rules for Tuning PID Controllers -Ziegler and Nichols proposed rules for determining values of the proportional gain K,, integral time 7;, and derivative time 7, based on the transient response characteristics of a given plant. -Such determination of the parameters of PID controllers or tuning of PID controllers can be made by engineers on-site by experiments on the plant. -Such rules suggest a set of values of K,, 7;, and T, that will give a stable operation of the system. However, the resulting system may exhibit a large maximum overshoot in the step response, which is unacceptable. - We need series of fine tunings until an acceptable result is obtained. Ziegler-Nichols 1*t Method of Tuning Rule - We obtain experimentally the response of the plant to a unit-step input, as shown in Figure 10-2. -The plant involves neither integrator(s) nor dominant complex- conjugate poles. -This method applies if the response to a step input exhibits an S- shaped curve. - Such step-response curves may be generated experimentally or from a dynamic simulation of the plant. loa ra te u(t) e(t) Figure 10-2. Unit-step response of a plant. e(t) S Tangent line at inflection point 0 t L= delay time T = time constant Figure 10-3 S-shaped response curve. Transfer function: Ziegler and Nichols suggested to set the values of K,, 7;, and 7, according to the formula shown in Table 10-1. Table 8-1 Ziegler-Nichols Tuning Rule Based on Step Response of Plant (First Method) Type of Controller Ke Ty ty F f 00 0 ay L PI 09 L 03 0 PID 12 L 2L OSL Notice that the PED controller tuned by the first method of Ziegler-Nichols rules gives 1 5 (1 “Ts7 a) GAs) T 1 wt(1 <3. osts) =06r ‘Thus, the PID controller has a pole at the origin and double zeros at s = —1/L. Ziegler-Nichols 2"! Method of Tuning Rule 1. We first set 7; = 20 and T= 0. Using the proportional control action only (see Figure 10-4). Figure 10-4 Closed-loop system with a proportional controller. 2. Increase K,, from 0 to a critical value K.,, at which the output first exhibits sustained oscillations. et) 4 Figure 8-5 Sustained oscillation with period P.,. (P,, is measured in sec.) © Ziegler and Nichols suggested that we set the values ofvthe parameters K,, 7;, and Td according to the formula shown in Table 10-2. Table 10-2 Ziegler—l Critical Period P., (Second Method) ichols Tuning Rule Based on Critical Gain K,, and Type of Controller Ky T; Ty P O.5Ke 0° 0 1 PI 045Ka D Py 0 PID 0.6K O.5SPy, 0.125P., Notice that the PID controller tuned by the second method of Ziegler-Nichols rules gives 1 GAs) = K,(1 ites ts) 1 = 06K, (1 + ont 0125R,s) Thus, the PID controller has a pole at the origin and double zeros at s = ~4/P.. = 0.075 Ke Pay Note that if the system has a known mathematical model (such as the transfer func- tion), then we can use the root-locus method to find the critical gain Ke, and the fre- quency of the sustained oscillations w.,, where 27r/w,, = P,,. These values can be found from the crossing points of the root-locus branches with the jo axis. (Obviously, if the root-locus branches do not cross the jw axis, this method does not apply.) Comments. Ziegler-Nichols tuning rules (and other tuning rules presented in the literature) have been widely used to tune PID controllers in process control systems where the plant dynamics are not precisely known. Over many years, such tuning rules Broved to be very useful. Ziegler-Nichols tuning rules can, of course, be applied to plants whose dynamics are known. (If the plant dynamics are known, many analytical and graphical approaches to the design of PID controllers are available, in addition to Ziegler-Nichols tuning rules) EXAMPLE 10-1 Consider the control system shown in Figure 10-6 in which a PED controller is used to control the system, The PID controller has the transfer function 1 (t+ +t) Although many analytical methods are available for the design of a PID controller for the pres- cent system, let us apply a Ziegler-Nichols tuning rule for the determination of the values of pa~ rameters K,, 7;, and T,. Then obtain a unit-step response curve and check to see if the designed system exhibits approximately 25% maximum overshoot. If the maximum overshoot is excessive (40% or more), make @ fine tuning and reduce the amount of the maximum overshoot to ap- proximately 25% or less. GAs Rs) 1 s(s+ s+ 5) PID controller Figure 10-6 PID-controlled system. Since the plant has an integrator, we use the second method of Ziegler-Nichols tuning rules. By setting 7; = oo and 7, = 0, we obtain the closed-loop transfer function as follows: (s) "sis + i)(s +5) + The value of K,, that makes the system marginally stable so that sustained oscillation occurs can be obtained by use of Routh’s st closed-loop system is y criterion. Since the characteristic equation for the SHOES HK, =O the Routh array becomes as follows: eo o41 Ss 26 =k, w-K, oS eK, Examining the coefficients of the first column of the Routh table, we find that sustained oscilla- tion will ovcur if K, 30, Thus, the critical gain Kis K, 730 With gain K, set equal to K,,(= 30), the characteristic equation becomes + 68 + 5s +30=0 To find the frequency of the sustained oscillation, we substitute s = ja into this characteristic equation as follows: (iw) + 6(jo)? + Siw) + 30 = 0 6(5 — «) + jufS ~ w#) = 0 from which we find the frequency of the sustained oscillation tobe o* = 5 period of sustained oscillation is Referring to Table 10-2, we determine K,,T,, and T, as follows: K, = 06K, = 18 T, = 05P, = 1.405 Ty = 0.125P, = 035124 ‘The transfer function of the PID controller is thus 6) = Kad + 1) / 1 ) +5 = +035 18(1 + 35g; + 038124s) ‘The PLD controller has a pole at the origin and double zero at s = ~1.4235. A block diagram of the control system with the designed PID controller is shown in Figure 10-7. 6.3223 (s + 1.4235)? I s s(s + IMs +5) PID controller Figure 10-7 Block diagram of the system with PID controller designed by use of the Ziegler-Nichols tuning rule (second method). ‘Next, let us examine the unit-step response of the system. The closed-loop transfer function C(s}/R(s) is given by es) 632235? + 185 + 12.811 Ris) 6s + 1132235" + 18s + 1281 MATLAB Program 10-1 % —---——- Unit-step response — num = (0 0 6.3223 18 12.811]; den =[1 6 11.3223 18 12.811]; step(num,den) grid title('Unit-Step Response’) Unit-Step Response 04 02 0 2 4 6 8 10 12 14 Time (see) Figure 10-8 Unit-step response curve of PID-controlled system designed by use of the Ziegler-Nichols tuning rule (second method). > The maximum overshoot in the unit-step response is approximately 62%.The amount of maximum overshoot is excessive. It can be reduced by fine tuning the controller parameters. Such fine tuning can be made on the computer. We find that by keeping K, = 18 and by moving the double zero of the PID controller to s = -0.65, that is, using the PID controller 2 Gis) = 18(1+ sche + 076829) = 135468 * OSE (10-1) the maximum overshoot in the wnit-step response can be reduced to approximately 18% => See Figure 10-9 Unit-Step Response 02 0 1 2: 3 4 5 6 7 Time (sec) Figure 10-9 Unit-step response of the system shown in Figure 8-6 with PID controller having parameters K, = 18, 7, = 3.077, and T, = 0.7692. If the proportional gain K, is increased to 39.42, without changing the location of the double zero (s = ~0.65), that is, using the PID controller (s +065)? Gs) (10-2) 39.42( 1 + + 076028) = 30322, 1 30775 then the speed of response is increased, bur the maximum overshoot is also increased to approx- imately 28%, as shown in Figure 10-10 Unit-Step Response 14 Z 08 Figure 10-10 206 Unit-step response of the system showa in Figure 10-6 with PID 04 i controller having parameters K, = 39.42, 02 : : 077, and 17692. © o 05 1 1S 2 25 3 35 4 45° 5 Time (see) ‘Since the maximum overshoot in this case is fairly close to 25% and the response is faster than the system with G,(s) given by Equation (10-1), we may consider G,(s) as given by Equation (10-2) as acceptable, Then the tuned values of Kp, and Ty become K, 23942, = 3077, T, = 0.7692 Itis interesting to observe that these values respectively are approximately twice the values sug- gested by the second method of the Ziegler-Nichols tuning rule. The important thing to note here is that the Ziegler-Nichols tuning rule has provided a starting point for fine tuning. - Varying the value of K (from 6 to 30) will not change the damping ratio of the dominant closed-loop poles very much. Figure 10-11 Root-locus diagram of system when PID controller has double zero at s =—1.4235, Figure 10-12 Root-locus diagram of system when PID controller has double zero at s =—0.65. K = 13.846 corresponds to G,(s) given by Equation (10— 1) and K = 30.322 corresponds to G,(s) given by Equation (10-2). 10-3 COMPUTATIONAL APPROACH TO OBTAIN OPTIMAL SETS OF PARAMETER VALUES EXAMPLE 10-2 Consider the PID-controlled system shown in Figure 10-13. The PLD controller is given by (sta)? GAs) = K Itis desired to find a combination of K and a such that the closed-loop system is underdamped and the maximum overshoot in the unit-step response is less than 10%, but more than 5%, to avoid an overdamped or a close-to-overdamped response. (Other conditions can be included, such as that the settling time be less than a specified value and the rise time be less than a cer- tain specified value.) Re) or 2 oo) s 0.3609 + 1.867 42.5841 PID contoller Figure 10-13 PID-controlled system. 21.05 break; % Breaks the inner loop end end ifm < 1.1 &m> 1.05 break; % Breaks the outer loop end end plottt,y) grid title("Unit-Step Response’ xlabel('t Sec’) ylabel(‘Output') KK = num2str(K); % String value of K to be printed on plot aa = num2strla); % String value of a to be printed on plot text(4.25,0.54,'K = '), text(4.75,0.54, KK) text4.25,0.46,'a = '), text(4.75,0.46,aa) sol = [k;a;m] Sol = 4.2000 0.7000 1.0962 Figure 10-14 Unit-step response curve obtained by use of MATLAB Program 10-2. 14 12 08 a 8 06 04 0.2 Unit-Step Response MATLAB Program 10-3 is basically the same as MATLAB Program 10-2. MATLAB Program 10-3 2:2; % Starts the outer loop to vary the K values 1.5:-0.2:0.5; % Starts the inner loop to vary the a values numt =K*[1 2%a a42]; denl = [0 1 0}; ‘tf =tfnumt, dent); num2 = [0 0 0 1.2}; den? = [0.36 1.86 2.5 11; {2 = tinum2,den2); 13 = fT; sys = feedbacktf3,1); tep(sys,0); m=maxly); ifm<1.1 &m> 1.05; plotity); grid; title('Unit-Step Response’) xlabel('t Sec’) ylabel('Output!) sol = [K;ajm] break; % Breaks the inner loop end end ifm < 1.1 &m> 1.05; break; % Breaks the outer loop end end sol = 4.2000 0.7000 1.0962 text(6.2, 0.35,'K text(6.2, 0.25,'a '), text(6.65, 0.35,num2str(K)) text(6.65, 0.25,num2str(a)) Unit-Step Response K=42 a=0.7 14 12 1 3 08 g 06 Figure 10-15 a Unit-step response curve obtained by 02 use of MATLAB Program 10-3, 0 0 EXAMPLE 10-3 In Example 10-2 we wrote MATLAB programs to find the first set of parameters to satisfy the given specifications There may be more than one set of parameters that satisfy the specifications. In this example, we shall obtain all sets of parameters that satisfy the given specifications. ‘Consider the same system as in Example 10-2, except that the problem here is to find all sets of K and a that will satisfy the given specification that the maximum overshoot in the unit-step response be less than 10%. (This means that overdamped systems are included.) Assume the search region to be 2sKs3, 0Ssasi5 In the actual design process, the step size should be sufficiently small In this example problem, however, we choose a fairly large step size to make the total number of search points reasonable. ‘Thus, we choose the step size for both K and ato be 0.2. To solve this problem it is possible to write many different MATLAB programs. We present here one such program, MATLAB Program 10-4. MATLAB Program 10-4 %'K! and a! values to test K = (2.0 2.2 2.4 26 2.8 3.0) a= (0.5 0.7 0.9 1.1 1.3 1.5); ‘% Evaluate closed-loop unit-step response at each 'K' and ‘a! combination ‘% that will yield the maximum overshoot less than 10% ge = tKG)*[1 2*aGj) alj)*2], (0 1 O}}; % controller 1c BI + Bc*g); % closed-loop transfer function epIG,t); m = maxly); ifm<1.10 kakel: solution(k,:) = [K(i) a) ml); end end end solution % Print solution table sol sortsolution = 2.0000 0.5000 0.9002 2.0000 0.5000 0.9002 2.0000 0.7000 0.9807 2.2000 0.5000 0.9114 2.0000 0.9000 1.0614 2.4000 0.5000 0.9207 2.2000 0.5000 0.9114 2.6000 0.5000 0.9283 2.2000 0.7000 0.9837 2.8000 0.5000 0.9348 2.2000 0.9000 1.0772 . 3.0000 0.5000 0.9402 2.4000 0.5000 0.9207 2.0000 0.7000 0.9807 2.4000 0.7000 0.9859 2.2000 0.7000 0.9837 2.4000 0.9000 1.0923 2.4000 0.7000 0.9859 2.6000 0.5000 0.9283 2.6000 0.7000 0.9877 2.6000 0.7000 0.9877 2.8000 0.7000 1.0024 2.8000 0.5000 0.9348 3.0000 0.7000 1.0177 2.8000 0.7000 1.0024 2.0000 0.9000 1.0614 3.0000 0.5000 0.9402 2.2000 0.9000 1.0772 3.0000 0.7000 1.0177 2.4000 0.9000 1.0923 sortsolution = sortrows{solution,3) % Print solution table sorted by % column 3 % Plot the response with the largest overshoot that is less than 10% K = sortsolution(k, 1) kK 2.4000 a = sortsolution(k,2) as 0.9000 ge=thK*[1 2%a a2], [0 1 Ob; G= gctgll + gc*g); step(G,0) grid % See Figure 10-16 ‘% If you wish to plot the response with the smallest overshoot that is % greater than 0%, then enter the following values of 'K' and ‘a K = sortsolution(11,1) K= 2.8000 a= sortsolution(11,2) as 0.7000 K*(1 2a a2), 10 1 0); *g/(1 + ge*g); step(G,0 grid % See Figure 10-17 Note that for a specification that the maximum overshoot be between 10% and 5%, there would be three sets of solutions: K = 20000, a= 09000, m= 10614 K = 22000, @= 0.9000, m= 10772 K = 24000, a= 09000, m= 1.0923 Unitstep response curves for these three cases are shown in Figure 10-18, Notice that the system with a larger gain K has a smaller rise time and larger maximum overshoot. Which one of these three systems is best depends on the system's objective. Uni -Step Response Curves 12 |} K=24,a=09 Figure 10-18 ‘Unit-step response curves of system with K = 2,0 =09; o 05 1 18 2 25 3 35 4 45 5 Time (sec)

You might also like