# lecture 7: pid tuning 1. objectives describe and use the two methods of ziegler-nichols to tune pid...

Post on 23-Dec-2015

216 views

Category:

## Documents

Embed Size (px)

TRANSCRIPT

• Slide 1
• Lecture 7: PID Tuning 1
• Slide 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. 2
• Slide 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 3
• Slide 4
• PID TUNING 020406080100120 0 0.5 1 1.5 S-LOOP plots deviation variables (IAE = 9.7189) Time Controlled Variable 020406080100120 0 0.5 1 1.5 Time Manipulated Variable Trial n: OK, finally, but took way too long!! Is there an easier way than trial & error? 4
• Slide 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 0 5101520253035404550 -0.5 0 0.5 1 1.5 Time Controlled Variable 05101520253035404550 0 0.2 0.4 0.6 0.8 1 Manipulated Variable S-shaped 5
• Slide 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 6
• Slide 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. 7
• Slide 8
• Ziegler Nichols tuning rules With the aid of the following table find the controller parameter corresponding to the FOPDT model obtained. 8
• Slide 9
• How to fit a FOPDT model to the process reaction curve? 9
• Slide 10
• EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve - Method I S = maximum slope L Data is plotted in deviation variables 10
• Slide 11
• EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve - Method II 0.63 0.28 t 63% t 28% Data is plotted in deviation variables 11
• Slide 12
• Recommended EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve - Methods I and II The same experiment in either method! Method I Prone to errors because of evaluation of maximum slope Method II Simple calculations 12
• Slide 13
• Notes on experiment design 13
• Slide 14
• EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve Is this a well designed experiment? Input should be close to a perfect step; this was basis of equations. If not, cannot use data for process reaction curve. 14
• Slide 15
• EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve Should we use this data? The output must be moved enough. Rule of thumb: Signal/noise > 5 15
• Slide 16
• EMPIRICAL MODEL BUILDING PROCEDURE Process reaction curve Plot measured vs predicted measured predicted 16
• Slide 17
• Example Let us apply ZN first method to the following process 1)Approximate the process with a FOPDT model using the two-points method. 2)Find the PID controller parameters recommended by ZNs first method. 17
• Slide 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) 18
• Slide 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 19
• Slide 20
• Answer, continued Applying a step input and recording the process reaction curve gives: t 28% = 0.75 sec, t 63% = 1.58 sec. 20
• Slide 21
• Answer, continued The FOPDT parameters are then: Then, the controller parameters are obtained as 21
• Slide 22
• Ziegler Nichols 2 nd 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 2 nd method? If the process is open loop unstable, or, If it is stable but does not give S-shaped step response. 22
• Slide 23
• Procedure of ZN 2 nd method 1.Put the process under closed-loop control (Use only a proportional controller). 2.Create a small disturbance in the loop by changing the set point. 3.Adjust the proportional gain, increasing and/or decreasing, until the oscillations have constant amplitude. 4.Record the gain value (K cu ) and period of oscillation (T u ). 5.Use the table to find the controller parameters. 23
• Slide 24
• The sustained oscillation 24
• Slide 25
• Example Let us apply ZNs 2 nd method to the following process 1)Find the ultimate gain and period. 2)Find the PID controller parameters recommended by ZNs second method. Then use MATLAB to plot the step set-point and disturbance responses of the closed loop system using the designed PID controller. 25
• Slide 26
• Using proportional controller K c, the characteristic equation of the closed- loop system is Writing the Routh array: The system is stable if K c < 1. So, the ultimate gain K cu =1. Answer 26
• Slide 27
• Answer, continued When K c = 1, Routh array becomes The third row is zero. So, the auxiliary equation obtained from the second row is 27
• Slide 28
• The sustained oscillation 28
• Slide 29
• Using the ZN 2 nd method, the PID controller parameters are calculated as: 29
• Slide 30
• Another method to find the ultimate gain, K cu Using the root locus method 30 syms s s=tf('s'); G=1/(s*(2*s+1)^2); rlocus(G)
• Slide 31
• The open loop response: 31
• Slide 32
• The closed-loop set-point step response 32
• Slide 33
• The closed-loop disturbance step response 33
• Slide 34
• 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) 34 MALAB code for this example
• Slide 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. 35

Recommended