Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 7: PID Tuning.

Similar presentations


Presentation on theme: "Lecture 7: PID Tuning."— Presentation transcript:

1 Lecture 7: PID Tuning

2 Objectives Describe and use the two methods of Ziegler-Nichols to tune PID controllers. Use the process reaction curve (step response) to fit a FOPDT model to the system. List some guidelines to design and implement a good step experiment.

3 PID TUNING How do we apply the same equation to many processes? How to achieve the dynamic performance that we desire? TUNING!!! The adjustable parameters are called tuning constants. We can match the values to the process to affect the dynamic performance

4 PID TUNING Is there Trial 1: unstable, lost $25,000 an easier way than
20 40 60 80 100 120 -40 -20 S-LOOP plots deviation variables (IAE = ) Time Controlled Variable -100 -50 50 Manipulated Variable Is there an easier way than trial & error? Trial 2: too slow, lost $3,000 20 40 60 80 100 120 0.2 0.4 0.6 0.8 1 S-LOOP plots deviation variables (IAE = ) Time Controlled Variable Manipulated Variable 20 40 60 80 100 120 0.5 1 1.5 S-LOOP plots deviation variables (IAE = ) Time Controlled Variable Manipulated Variable Trial n: OK, finally, but took way too long!!

5 Ziegler Nichols’ First method
When to use the first method? The first method is applicable for processes whose “process reaction curve” (open-loop step response) is “S-shaped”. DYNAMIC SIMULATION Time 5 10 15 20 25 30 35 40 45 50 -0.5 0.5 1 1.5 Controlled Variable 0.2 0.4 0.6 0.8 Manipulated Variable S-shaped

6 EMPIRICAL MODEL BUILDING PROCEDURE
Process reaction curve - The simplest and most often used method. Gives nice visual interpretation as well. 1. Start at steady state 2. Single step to input 3. Collect data until steady state 4. Perform calculations T

7 Ziegler Nichols’ First method
How to use the first method? Apply a step input to the process (open-loop). Record the process reaction curve. Fit a FOPDT model to the “process reaction curve”.

8 Ziegler Nichols tuning rules
With the aid of the following table find the controller parameter corresponding to the FOPDT model obtained.

9 How to fit a FOPDT model to the process reaction curve?

10 EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve - Method I
S = maximum slope L Data is plotted in deviation variables

11 EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve - Method II
0.63 0.28 t28% t63% Data is plotted in deviation variables

12 EMPIRICAL MODEL BUILDING PROCEDURE
Process reaction curve - Methods I and II The same experiment in either method! Recommended Method I Prone to errors because of evaluation of maximum slope Method II Simple calculations

13 Notes on experiment design

14 EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve
Input should be close to a perfect step; this was basis of equations. If not, cannot use data for process reaction curve. Is this a well designed experiment?

15 EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve
The output must be “moved” enough. Rule of thumb: Signal/noise > 5 Should we use this data?

16 EMPIRICAL MODEL BUILDING PROCEDURE
Process reaction curve Plot measured vs predicted measured predicted

17 Example Let us apply ZN first method to the following process
Approximate the process with a FOPDT model using the two-points method. Find the PID controller parameters recommended by ZN’s first method.

18 Answer The step response of the given process is given by
Using partial fractions Hence the time domain step response is given by Which has a steady state value of 0.5. Therefore, we need to find the time at which the response becomes approximately 0.14 and 0.31 (28% and 63%, respectively)

19 Answer, continued We can write the following equations:
Which can be rewritten as (where we defined A = e-t1 and B = e-t2 ) These are simple quadratic equations which can be solved to give

20 Answer, continued Applying a step input and recording the process reaction curve gives: t28% = 0.75 sec, t63% = 1.58 sec.

21 Answer, continued The FOPDT parameters are then:
Then, the controller parameters are obtained as

22 Ziegler Nichols’ 2nd method (Ultimate-Cycle Method)
While the first Ziegler-Nichols method is used in open-loop configuration, the second method is used in closed-loop. When to use the 2nd method? If the process is open loop unstable, or, If it is stable but does not give S-shaped step response.

23 Procedure of ZN 2nd method
Put the process under closed-loop control (Use only a proportional controller). Create a small disturbance in the loop by changing the set point. Adjust the proportional gain, increasing and/or decreasing, until the oscillations have constant amplitude. Record the gain value (Kcu) and period of oscillation (Tu). Use the table to find the controller parameters.

24 The sustained oscillation

25 Example Let us apply ZN’s 2nd method to the following process
Find the ultimate gain and period. Find the PID controller parameters recommended by ZN’s second method. Then use MATLAB to plot the step set-point and disturbance responses of the closed loop system using the designed PID controller.

26 Answer Using proportional controller Kc, the characteristic equation of the closed-loop system is Writing the Routh array: The system is stable if Kc < 1. So, the ultimate gain Kcu =1.

27 Answer, continued When Kc = 1, Routh array becomes
The third row is zero. So, the auxiliary equation obtained from the second row is

28 The sustained oscillation

29 Using the ZN 2nd method, the PID controller parameters are calculated as:

30 Another method to find the ultimate gain, Kcu
Using the root locus method syms s s=tf('s'); G=1/(s*(2*s+1)^2); rlocus(G)

31 The open loop response:

32 The closed-loop set-point step response

33 The closed-loop disturbance step response

34 MALAB code for this example
close all % Simulate t=0:0.01:70; s=tf('s'); G = 1/(s*(2*s+1)^2); figure(1) step(G,t) % The FOPDT parameters Ku = 1; Pu = 12.54; % The PID parameters using ZN first method Kc = 0.6*Ku; tauI = 0.5*Pu; tauD = 0.125*Pu; KI=Kc/tauI; KD=Kc*tauD; Gc = pid(Kc,KI,KD,0.01); % Set point step response cloop = Gc*G/(1+Gc*G); figure(2) step(cloop,t) % Disturbance step response cloop_dist = G/(1+Gc*G); figure(3) step(cloop_dist,t) MALAB code for this example

35 Comments on ZN tuning rules
It is realized that the responses are oscillatory. Generally, Ziegler-Nichols tuning is not the best tuning method. However, these two guys were real pioneers in the field! It has taken 50 years to surpass their guidelines.


Download ppt "Lecture 7: PID Tuning."

Similar presentations


Ads by Google