1 / 37

Lecture 5: PID Tuning

Lecture 5: PID Tuning. Objectives. To tune PID controllers using the two methods of Ziegler-Nichols. To use the process reaction curve (step response) to fit a FOPDT model to the system. To know some guidelines in order to design and implement a good experiment. PID TUNING.

brian-guy
Télécharger la présentation

Lecture 5: PID Tuning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 5: PID Tuning

  2. Objectives • To tune PID controllers using the two methods of Ziegler-Nichols. • To use the process reaction curve (step response) to fit a FOPDT model to the system. • To know some guidelines in order to design and implement a good 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. S-LOOP plots deviation variables (IAE = 608.1005) 40 Trial 1: unstable, lost $25,000 20 0 Controlled Variable -20 -40 0 20 40 60 80 100 120 Time 100 50 0 Manipulated Variable -50 -100 0 20 40 60 80 100 120 Time S-LOOP plots deviation variables (IAE = 23.0904) 1 Trial 2: too slow, lost $3,000 0.8 0.6 Controlled Variable 0.4 0.2 0 0 20 40 60 80 100 120 Time 1 0.8 0.6 Manipulated Variable 0.4 0.2 0 0 20 40 60 80 100 120 Time Trial n: OK, finally, but took way too long!! S-LOOP plots deviation variables (IAE = 9.7189) 1.5 1 Controlled Variable 0.5 0 0 20 40 60 80 100 120 Time 1.5 1 Manipulated Variable 0.5 0 0 20 40 60 80 100 120 Time PID TUNING Is there an easier way than trial & error?

  5. DYNAMIC SIMULATION 1.5 1 Controlled Variable 0.5 0 -0.5 5 10 15 20 25 30 35 40 45 50 0 Time 1 0.8 0.6 Manipulated Variable 0.4 0.2 0 0 5 10 15 20 25 30 35 40 45 50 Time 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”. 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    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. Recommended EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve - Methods I and II The same experiment in either method! • Method I • Developed first • Prone to errors because of evaluation of maximum slope • Method II • Developed in 1960’s • Simple calculations

  13. Notes on experiment design

  14. Input should be close to a perfect step; this was basis of equations. If not, cannot use data for process reaction curve. EMPIRICAL MODEL BUILDING PROCEDURE 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 Should we use this data?

  17. EMPIRICAL MODEL BUILDING PROCEDURE Output did not return close to the initial value, although input returned to initial value Process reaction curve This is a good experimental design; it checks for disturbances

  18. EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve Plot measured vs predicted measured predicted

  19. 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. • Compare the closed loop to open loop response. • Plot the unit step disturbance response.

  20. Answer • Applying a step input and recording the process reaction curve gives: t28% = 5.35 sec, t63% = 8.67 sec.

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

  22. %M-file for Ziegler-Nichols tuning rules for PID controller t=0:0.05:40; s=tf('s'); G = 1/(2*s+1)^4; step(G,t) t28=5.35; t63=8.67; % The two points obtained from the figure % The FOPDT parameters Kp = 1; tau = 1.5*(t63-t28); td = t63-tau; % The PID parameters using ZN first method Kc = 1.2*tau/td; tauI = 2*td; tauD = 0.5*td; KI=Kc/tauI; KD=Kc*tauD; Gc = pid(Kc,KI,KD,0.01); cloop = Gc*G/(1+Gc*G); hold on % Set point step response step(cloop,t) % Disturbance step response cloop_dist = G/(1+Gc*G); figure(2) step(cloop_dist)

  23. Ziegler Nichols’ second 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 second method? • If the process is open loop unstable, or, • If it is stable but does not give S-shaped step response.

  24. Procedure of Ziegler Nichols’ Ultimate-Cycle 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.

  25. The sustained oscillation

  26. 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. • Plot the step set-point response of the closed loop system using the designed PID controller. • Plot the step disturbance response of the closed loop system using the designed PID controller.

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

  28. Answer • When = 1, Routh array becomes 4 1 4 0 The third row is zero. So, the auxiliary equation obtained from the second row is . Solving it gives . w = 0.5 rad/sec = 2 = 12.56 sec.

  29. The sustained oscillation

  30. Using the ZN second method, the PID controller parameters are calculated as:

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

  32. The open loop response:

  33. The closed-loop set-point step response

  34. The closed-loop disturbance step response

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

More Related