Introduction: PID Controller Design In this tutorial we will introduce a simple yet versatile feedback compensator structure, the Proportional-Integral-Derivative (PID) controller. e e will discuss the effect of each of the pid parameters on the closed-loop dynamics d ynamics and demonstrate how to use a PID controller to improve the system performance. !ey "#$%#& "#$%#& commands used in this tutorial are' tf , step , pid , feedback , pidtool , pidtune
Contents • • • • • • • • • •
PID verview $he haracteristics of P, I, and D ontrollers *+ample Problem pen-%oop tep esponse Proportional ontrol Proportional-Derivative ontrol Proportional-Integral ontrol Proportional-Integral-Derivative ontrol eneral $ips for Designing a PID ontroller #utomatic PID $uning
PID Overview In this tutorial, we will consider the following unity feedback system'
$he output of a PID controller, e/ual to the control input to the plant, in the time-domain is as follows'
(0) 1irst, let2s take a look at how the PID controller works in a closed-loop system using the schematic shown above. $he variable ( ) represents the tracking error, error, the difference difference between the desired input value ( ) and the actual output ( ). $his error signal ( ) will be sent to the PID controller, and the controller computes both the derivative an d the integral of this error signal. $he control signal signal ( ) to the plant is e/ual to the proportional proportional gain (
) times times the magnitu magnitude de of the error error plus plus the the integral integral gain gain ( ) times times the integr integral al of the error plus the derivative gain ( ) times the derivative of the error. error. $his contro controll signal signal ( ) is sent sent to the plant, plant, and the the new output output ( ) is obtaine obtained. d. $he new output ( ) is then then fed back and compare compared d to the reference reference to to find the new new error signal signal ( ). $he controller takes this new error signal and computes its derivative and its integral again, ad infinitum. $he transfer function of a PID controller is found by taking the %aplace transform of */. (0).
(3) 4 Proportional gain
4 Integral gain
4 Derivative gain
e can define a PID P ID controller in "#$%#& "#$%#& using the transfer function directly, directly, for e+ample' Kp = 1; Ki = 1; Kd = 1; s = tf('s'); C = Kp + Ki/s + Kd*s C = s^2 + s + 1 ----------s Continuous-time tansfe function!
#lternatively, we may use "#$%#&2s pid controller object to generate an e/uivalent continuous-time controller as follows' C = pid(Kp"Ki"Kd) C = 1 Kp + Ki * --- + Kd * s s #it$ Kp = 1" Ki = 1" Kd = 1 Continuous-time %& contolle in paallel fom!
%et2s convert the pid ob5ect to a transfer function to see that it yields the same result as above'
tf(C) ans = s^2 + s + 1 ----------s Continuous-time tansfe function!
The Characteristics of P, I, and D Controllers # proportiona proportionall controller controller ( ) will will have the the effect effect of reduci reducing ng the rise rise time time and will will reduce but never eliminate the steady-state error . #n #n integr integral al cont contro roll ( ) will will hav havee the the effect of eliminating the steady-state error for a constant or step input, but it may make the transient response slower. # derivative control ( ) will have the effect of increasing the stability of the system, reducing the overshoot, and improving the transient response. $he effects of each of controller parameters, summari6ed in the table below.
,
, and
on a closed-loop system are
C !"#PO$ !"#PO$#" #" !I#" !I#" TI%" TI%" O&"!# O&"!#'OO 'OOT T #"TTI #"TTI$( $( TI%" TI%" #-# "!!O! "!!O! Decrease Increase mall hange Decrease )p Decrease Increase Increase *liminate )i )d mall hange Decrease Decrease 7o hange
7ote that these correlations may not be e+actly accurate, because , , and are dependent on each other. In fact, changing one of these variables can chang e the effect of the other two. 1or this reason, the table should only be used as a reference when you are determining the values for , and .
"*a+ple Proble+ uppose we have a simple mass, spring, and damper problem.
$he modeling e/uation of this system is (8) $aking $aking the %aplace transform of the modeling e/uation, we get (9) $he transfer function between the displacement
and the input
then becomes
(:) %et b k ,
= = = =
1 k 1 s/m 2 /m 1
Plug these values into the above transfer function
(;) $he goal of this problem is to show you how each of
,
and
contributes to obtain
,ast ise time inimum oes$oot o stead.-state eo
Open-oop #tep !esponse %et2s first view the open-loop step response. reate a new m-file and run the following code' s = tf('s'); % = 1/(s^2 + 1*s + 2); step(%)
$he D gain of the plant transfer function is 0<3=, so =.=: is the final value of the output to an unit step input. $his corresponds to the steady-state error of =.>:, /uite large indeed. 1urthermore, the rise time is about one second, and the settling time is about 0.: seconds. %et2s design a controller that will reduce the rise time, reduce the settling time, and eliminate the steady-state error.
Proportional Control 1rom the table shown above, we see that the proportional controller (!p) reduces the rise time, increases the overshoot, and reduces the steady-state error. $he closed-loop transfer function of the above system with a proportional controller is'
(?) %et the the proport proportional ional gain ( Kp = ; C = pid(Kp) 0 = feedback(C*%"1) t = !12;
) e/ual e/ual 8== and change change the the m-file m-file to the the followin following' g'
step(0"t) C = Kp = %-onl. contolle!
0 = ---------------s^2 + 1 s + 2 Continuous-time tansfe function!
$he above plot shows that the proportional controller reduced both the rise time and the steady-state error, increased increased the overshoot, and decreased the settling time by small amount.
Proportional-Derivative Control 7ow, let2s take a look at a PD control. 1rom the table shown above, we see that the derivative controller (!d) reduces both the overshoot and the settling time. $he closedloop transfer function of the given system with a PD controller is'
(@) %et e/ual 8== as before and let e/ual 0=. *nter the following commands into an mfile and run it in the "#$%#& command window. Kp = ; Kd = 1; C = pid(Kp""Kd) 0 = feedback(C*%"1) t = !12; step(0"t) C =
Kp + Kd * s
#it$ Kp = " Kd = 1 Continuous-time % contolle in paallel fom!
0 = 1 s + ---------------s^2 + 2 s + 2 Continuous-time tansfe function!
$his plot shows that the derivative controller reduced both the overshoot and the settling time, and had a small effect on the rise time and the steady-state error.
Proportional-Integral Control &efore going into a PID control, let2s take a look at a PI control. con trol. 1rom the table, we see that an integral controller (!i) decreases the rise time, increases both the ov ershoot and the settling time, and eliminates the steady-state error. 1or the given system, the closedloop transfer function with a PI control is'
(>) %et2s reduce the commands.
to 8=, and let
Kp = ; Ki = ; C = pid(Kp"Ki) 0 = feedback(C*%"1) t = !12; step(0"t)
e/ual ?=. reate an new m-file and enter the following
C = 1 Kp + Ki * --s #it$ Kp = " Ki = Continuous-time %& contolle in paallel fom!
0 = s + -----------------------s^ + 1 s^2 + 3 s + Continuous-time tansfe function!
un this m-file in the "#$%#& "#$%#& command window, and you should get the following plot. e e have reduced the proportional gain (!p) because the integral controller also reduces the rise time and increases the overshoot as the proportional controller does (double effect). $he above response shows that the integral controller eliminated the steady-state error.
Proportional-Integral-Derivative Control 7ow, let2s take a look at a PID controller. $he closed-loop transfer function of the given system with a PID controller is'
(0=) #fter several trial and error runs, the gains 4 8:=, 4 8==, and 4 := provided the desired response. $o confirm, enter the following commands to an m-file and run it in the command window. Aou Aou should get the following step response. Kp = 3; Ki = ; Kd = 3; C = pid(Kp"Ki"Kd) 0 = feedback(C*%"1); t = !12; step(0"t) C = 1 Kp + Ki * --- + Kd * s s #it$ Kp = 3" Ki = " Kd = 3 Continuous-time %& contolle in paallel fom!
7ow, we have obtained a closed-loop system with no overshoot, fast rise time, and no steady-state error.
(eneral Tips for Designing a PID Controller hen you are designing a PID controller for a given system, follow the steps shown below to obtain a desired response. 0. 3. 8. 9. :.
btain btain an open-loop open-loop response response and and determine determine what what needs needs to be improv improved ed #dd a proportiona proportionall control control to improve improve the rise rise time #dd a deriva derivativ tivee control control to to improv improvee the oversh overshoot oot #dd an integral integral control control to elimina eliminate te the steady-state steady-state error #d5ust #d5ust each of !p, !p, !i, and !d until until you obtain obtain a desired desired overall overall response. response. Aou can always refer to the table shown in this BPID $utorialB $utorialB page to find out which wh ich controller controls what characteristics.
%astly, %astly, please keep in mind that you do not need to implement all three controllers (proportional, derivative, and integral) into a single system, if not necessary. 1or e+ample, if a PI controller gives a good enough response (like the above e+ample), then you don2t need to implement a derivative controller on the system. !eep the controller as simple as possible.
uto+atic PID Tuning "#$ "#$%#& provides tools for automatically choosing optimal PID gains which makes the trial and error process described above unnecessary. Aou Aou can access the tuning algorithm directly using pidtune or through a nice graphical user interface (CI) using pidtool . $he "#$%#& "#$%#& automated tuning algorithm chooses PID gains to balance performance (response time, bandwidth) and robustness (stability margins). &y default the algorthm designs for a ;= degree phase margin. %et2s e+plore these automated tools by first generating a proportional controller for the mass-spring-damper system by entering the following commands' pidtool(%"'p')
$he pidtool CI window, like that shown below, should appear.
7otice that the step response shown is slower than the proportional controller controller we designed by hand. 7ow click on the #how Para+eters button on the top right. #s e+pected the proportional gain constant, !p, is lower than the one we used, !p 4 >9.@: 8==. e can now interactively tune the controller parameters and immediately see the resulting response int he CI window. $ry $ry dragging the resposne time slider to the right
to =.09s, as shown in the figure below. $he response does indeeed speed up, and we can see !p is now closer to the manual value. e can also see all the other performance p erformance and robustness parameters for the system. 7ote that the phase margin is ;= degrees, the default for pidtool and generally a good go od balance of robustness and performance.
7ow let2s try designing a PID controller for our system. system. &y specifying the previously designed or (baseline) controller, , as the second parameter, pidtool will design another
PID controller (instead of P or PI) and will compare the response of the system with the automated controller with that of the baseline. pidtool(%"C)
e see in the output window that the automated au tomated controller responds slower and e+hibits more overshoot than the baseline. 7ow choose the Design %ode: "*tended option at the top, which reveals more tuning parameters.
7ow type in andwidth: ./ rad0s and Phase %argin: 12 deg to generate a controller similar in performance to the baseline. !eep in mind that a higher bandwidth (= d& crossover of the open-loop) results in a faster rise time, and a higher phase margin reduces the overshoot and improves the system stability. stability. 1inally we note that we can generate the same controller using the command line tool pidtune instead of the pidtool CI
opts = pidtune4ptions('Cossoe,e5uenc.'"2"'%$aseain'"6); 7C" info8 = pidtune(%" 'pid'" opts) C = 1 Kp + Ki * --- + Kd * s s #it$ Kp = 2" Ki = 196" Kd = 1!3 Continuous-time %& contolle in paallel fom! info = :table 1 Cossoe,e5uenc. 2 %$aseain 6
*ffects $ips
PIDTuningClassical analytics uacct4BC#-000>;0>=-0B E
#uthors' Hames &ennett, #5ay &hasin, Hamila rant, en en hung %im tewards' #rthur #rthur *dge III, !athryn "ientel, enu ao, !aveh aba Date Presented' 0=<0><3==; << Date evised' 0=<0;<3==? • •
1irst round reviews for this page ebuttal for this page
Contents hide hideJJ •
0 Intr Introdu oductio ction n
•
• •
3 $rial and *rror *rro r o 3. 3.0 0 1l 1low ow o 3. 3.3 3 %e %eve vell Pressur suree o 3.8 Pres o 3.9 $empera $emperature ture 8 Process eaction urve 9 Kiegler-7 Kiegler-7ichols ichols "ethod Kiegler-7icho ls closedclosed-loop loop tuning method o 9.0 Kiegler-7ichols 9.0.0 losed %oop (1eed (1eedback back %oop) 9.0.3 9.0 .3 #dva #dvanta ntages ges 9.0.8 Disadvan Disadvantages tages o 9.3 Kiegler-7ichols Kiegler-7ich ols pen-%oop $uning "ethod or Process eaction "ethod' 9.3.0 pen %oop (1eed 1orward %oop) 9.3.3 9.3 .3 #dva #dvanta ntages ges 9.3.8 Disadvan Disadvantages tages : ohen ohen-oon -oon "ethod o :.0 #dv #dvanta antages ges o :.3 Disadvantages Disadvantage s and %imitations ; th ther er "et "ethod hodss o ;.0 Internal "odel ontrol o ;.3 #uto $une Fariatio Fariation n ? *+ *+amp amples les *+amp le 0 o ?.0 orked out *+ample ?.0.0 ?.0 .0 Prob Problem lem ?.0.3 ?.0 .3 olu olution tion o ?.3 orked out *+ample *+amp le 3 ?.3.0 ?.3 .0 Prob Problem lem ?.3.3 ?.3 .3 olu olution tion o ?.8 $uning the parameters parameter s of a PID controller controlle r on an actual system syste m o ?.9 "ultiple hoice Luestion 0 o ?.: "ultiple hoice Luestion 3 o ?.; ag age2s e2s orn orner er
•
•
•
•
@ ef eferen erences ces
Introduction urrently, more than half of the controllers used in industry are PID controllers. In the past, many of these controllers were analogM however, many many of today2s controllers use digital signals and computers. hen a mathematical model of a system is available, the parameters of the controller can be e+plicitly determined. Nowever, when a mathematical model is unavailable, the parameters must be determined e+perimentally. ontroller tuning is the process of determining the controller parameters which produce the desired
output. ontroller tuning allows for optimi6ation of a process and minimi6es the error between the variable of the process and its set point. $ypes $ypes of controller tuning methods include the trial and error method, and process reaction curve methods. $he most common classical controller tuning methods are the Kiegler-7ichols and ohen-oon methods. $hese methods are often used when the mathematical model of the system is not available. $he Kiegler-7ichols method can be used for both closed and open loop syste+s , while ohen-oon is typically used for open loop systems. # closed-loop control system is a system which uses feedback control. In an open-loop system, the output is not no t compared to the input. $he e/uation below shows the PID algorithm as discussed in the previous PID ontrol section.
u is the control signal O is the difference between the current value a nd the set point. K c is the gain for a proportional controller. i is the parameter that scales the integral controller. d is is the parameter p arameter that scales the derivative d erivative controller. t is is the time taken for error measurement. b is the set point value of the signal, also known as bias or offset. $he e+perimentally obtained controller gain which gives stable and consistent con sistent oscillations for closed loop systems, or the ulti+ate gain , is defined as K as K u . K . K c is the controller gain which has been corrected by the Kiegler-7ichols or ohen-oon methods, and can be input into the above e/uation. K e/uation. K u is found e+perimentally by starting from a small value of K of K c and ad5usting upwards until consistent oscillations are obtained, as shown below. If the gain is too low, the the output signal will be damped and attain e/uilibrium eventually after the disturbance occurs as shown below.
n the other hand, if the gain is too high, the oscillations become unstable un stable and grow larger and larger with time as shown below.
$he process $he process reaction curve method curve method section shows the parameters re/uired for open loop system calculations. $he Kiegler-7ichols "ethod section "ethod section shows how to find K find K c, T i, and T d d for open and closed loop systems, and the ohen-oon section shows an alternative way to find K find K c, T i, and T d d .
pen loop systems typically use the /uarter decay ratio (LD) for oscillation dampening. $his means that the ratio of the amplitudes of the first overshoot to the second overshoot is 9'0.
#ource3s4: PID$uninglassical
Trial and "rror $he trial and error tuning method is based on guess-and-check. In this method, the proportional action is the main control, while the integral and derivative actions refine refine it. $he controller gain, K gain, K c, is ad5usted with the integral and derivative d erivative actions held at a minimum, until a desired output is obtained. &elow are some common values of K of K c, T i, and T d d used used in controlling flow, levels, pressure or temperature for trial and error calculations.
5low P or PI control can be used with low controller con troller gain. Cse PI control for more accuracy with high integration activity. Derivative Derivative control is not considered due to the rapid fluctuations in flow dynamics with lots of noise. K c 6
278-279
6 T i i 6
9s
evel P or PI control can be used, although PI P I control is more common due to inaccuracies incurred due to offsets in P-only control. Derivative control is not considered du e to the rapid fluctuations in flow dynamics with lots of noise. $he following P only setting is such that the control valve is fully open when the vessel is ?:Q full and fully closed when 3:Q 3: Q full, being half open when :=Q filled. K c 6
/
ias b 6 2; #et point 6 2;
1or PI control' K c 6
/-/2
T i i 6
<- +in
Pressure
$uning here has a large range of possible values of K of K c and T i for use in PI control, depending on if the pressure measurement is in li/uid or gas phase. Liquid K c 6 27-/ 6 T i i 6
9-< s
Gas K c 6 /-<2 T i i 6
/-<2 +in
Te+perature Due to the relatively slow response of temperature sensors to dynamic temperature changes, PID controllers are used. K c 6
/-<2
6 T i i 6
/-<2 +in
6 T d d 6
2- +in
Process !eaction Curve In this method, the variables being measured are those of a system that is already in place. # disturbance is introduced into the system and data can then be obtained from this curve. 1irst the system is allowed to reach steady state, and then a disturbance, X disturbance, X o, is introduced to it. $he percentage of disturbance to the system can be introduced by a change in either the set point or process variable. 1or e+ample, if you have a thermometer in which you can only turn it up or down by 0= degrees, then raising the temperature by 0 degree would be a 0=Q 0 =Q disturbance to the system. $hese types of curves are obtained in open loop systems when there is no control of the system, allowing the disturbance to be recorded. $he process reaction curve method usually produces a response to a step function change for which several parameters may b e measured which include' transportation lag or dead time, dead , the time for the response to change, , and the ultimate value that the response reaches at steady-state, M steady-state, M u.
dead 4 4 transportation lag or dead time' the time taken from the moment the disturbance was introduced to the first sign of change in the output signal
4 the time for the response to occur X o 4 the si6e of the step change
M u 4 the value that the response goes to as the system returns to steady-state
#n e+ample for determining these parameters for a typical process response curve to a step change is shown below. In order to find the values for dead and and , a line is drawn at the point of inflection that is tangent to the response curve and then these values are found from the graph.
$o map these parameters to P,I, P,I, and D control constants, see $able 3 and 8 below in the K 7 and ohen oon sections.
=iegler-$ichols %ethod
In the 0>9=2s, Kiegler and 7ichols devised de vised two empirical methods for obtaining controller parameters. $heir methods were used for non-first non-first order plus dead time situations, and involved intense manual calculations. ith ith improved optimi6ation software, most manual methods such as these are no longer used. Nowever, even with computer aids, the following two methods are still employed today, and are considered among the most common'
=iegler-$ichols =iegler-$ichols closed-loop tuning +ethod $he Kiegler-7ichols closed-loop tuning method allows you to use the ultimate gain value, K u, and the ultimate period of oscillation, P oscillation, P u, to calculate K calculate K c . It is a simple method of tuning PID controllers and can be refined to give better appro+imations of the controller. Aou Aou can obtain the controller constants K constants K c , T i , and T d d in in a system with feedback. $he Kiegler-7ichols closed-loop tuning method is limited to tuning processes that cannot run in an open-loop environment.
Determining the ultimate gain value, K value, K u, is accomplished by finding the value of the proportional-only gain that causes the control loop to oscillate indefinitely indefinitely at steady state. $his means that the gains from the I and D controller are set to 6ero so that the influence of P can be determined. It tests the robustness of the K the K c value so that it is optimi6ed for the controller. #nother #nother important value associated with this proportional-only control tuning method is the ultimate period ( P u). $he ultimate period is the time re/uired to complete one full oscillation while the system is at steady state. $hese two parameters, K parameters, K u and P and P u, are used to find the loop-tuning constants of the controller co ntroller (P, PI, or PID). $o find the values of these parameters, and to calculate c alculate the tuning constants, use the following procedure' Closed oop 35eedbac> oop4
0. emove emove integral integral and and derivative derivative action. action. et integral integral time time (T (T i) to >>> or its largest value and set the derivative controller (T (T d d) to 6ero. 3. reate reate a small distur disturbance bance in the the loop by changing changing the set set point. point. #d5ust #d5ust the the proportional, increasing and
Figure 1. 1. ystem tuned using the Kiegler-7ichols closed-loop tuning method 9. Plug these values into the Kiegler-7ichols closed loop e/uations and determine the necessary settings for the controller.
Table 1. 1. losed-%oop alculations of K of K c, T i, T d d
dvantages
0. *asy e+perimentM e+perimentM only need to to change change the the P controller controller 3. Includes Includes dynamics dynamics of whole whole process, process, which which gives gives a more accurate accurate picture picture of how how the system is behaving Disadvantages
0. *+peri *+perimen mentt can can be time time consum consuming ing 3. an venture venture into unstabl unstablee regions regions while testi testing ng the P control controller, ler, which could could cause the system to become out of control
=iegler-$ichols =iegler-$ichols Open-oop Tuning %ethod or Process !eaction %ethod: %ethod :
$his method remains a popular techni/ue for tuning controllers that use proportional, integral, and derivative actions. $he Kiegler-7ichols open-loop method is also referred to as a process reaction method, because it tests the open-loop reaction of the process to a change in the control variable output. $his basic test re/uires that the response of the system be recorded, preferably by a plotter o r computer. nce certain process response values are found, they can be plugged into the Kiegler-7ichols e/uation with specific multiplier constants for the gains of a controller with either P, PI, or PID actions. Open oop 35eed 5orward oop4
$o use the Kiegler-7ichols open-loop tuning method, you must perform the following steps' 0. "ake an open loop step test 3. 1rom the process the process reaction curve determine curve determine the transportation lag or dead time, dead , the time constant or time for the response to change, , and the ultimate value that the response reaches at steady-state, M steady-state, M u, for a step change of Xo of Xo..
8. Determine the loop tuning constants. Plug in the reaction rate and lag time values to the Kiegler-7ichols open-loop tuning e/uations for the appropriate controllerRP, PI, or PIDRto calculate the controller constants. co nstants. Cse the table below.
Table 2. 2. pen-%oop alculations of K of K c, T i, T d d
dvantages
0. Luick Luick and easi easier er to use use than than other other metho methods ds 3. It is a robus robustt and and popul popular ar method method 8. f these these two techni/ues techni/ues,, the Process Process eaction eaction "ethod "ethod is the the easiest easiest and least least disruptive to implement Disadvantages
0. It depends depends upon purely purely proportio proportional nal measuremen measurementt to estimate estimate I and D controll controllers. ers.
3. #ppr #ppro+i o+ima mati tion onss for for the the K K c, T i, and T d d values values might not be entirely accurate for different systems. 8. It does does not hold hold for I, I, D and PD cont control roller lerss
Cohen-Coon %ethod $he ohen-oon method of controller tuning corrects the slow, steady-state steady-state response given by the Kiegler-7ichols method when there is a large dead time (process delay) relative to the open loop time constantM a large process delay is necessary to make this method practical because otherwise unreasonably large controller gains will be p redicted. $his method is only used for first-order models with time delay, due to the fact that the controller does not instantaneously respond to the disturbance (the step disturbance is progressive instead of instantaneous). $he ohen-oon method is classified as an 2offline2 method for tuning, meaning that a step change can be introduced to the input once it is at steady-state. $hen the output can be measured based on the time constant and the time delay and this response can be used to evaluate the initial control parameters. 1or the ohen-oon method, there are a re a set of pre-determined settings to get minimum offset and standard decay ratio of 0<9(LD). # 0<9(LD) decay ratio refers to a response that has decreasing oscillations in such a manner that the second oscillation will have 0<9 the amplitude of the first oscillation . $hese settings are shown in $able $able 8.. Table 3. 3. tandard recommended e/uations to optimi6e ohen oon predictions
where the variables P, 7, and % are defined b elow.
#lternatively, K #lternatively, K = can be used instead of (P<7%). K (P<7%). K =,, and dead are are defined in process in process reaction curve section. #n e+ample using these parameters is shown here 0J 0J..
$he process in ohen-oon turning method is the following' 0. ait ait until the process reaches steady state. 3. Introduce a step change in the input. 8. &ased on the output, obtain an appro+imate first order process with a time constant delayed by dead units units from when the input step was introduced. $he values of and dead can can be obtained by first recording the following time instances' t= 4 time at input step start point t3 4 time when reaches half point t8 4 time when reaches ;8.3Q point
9. Csing the measurements at t=, t3, t8, # and &, evaluate the process parameters , dead , and K and K o. :. 1ind the controller parameters based on , dead , and K and K o.
dvantages
0. Csed Csed for syste systems ms with with time time dela delay y. 3. Luicke Luickerr close closed d loop loop resp respons onsee time. time.
Disadvantages and i+itations 0. 3. 8. 9.
Cnstab Cnstable le closed closed loop loop syste systems. ms. an only be used used for first first order order models models includin including g large process process delays delays.. ffl fflin inee met metho hod. d. #ppr #ppro+i o+ima mati tion onss for for the the K K c, i, and d values values might not be entirely accurate accu rate for different systems.
Other %ethods $hese are other common methods that are used, but they can be complicated and aren2t considered classical methods, so they are only b riefly discussed.
Internal %odel Control $he Internal "odel ontrol (I") method was developed with robustness in mind. $he Kiegler-7ichols open loop and ohen-oon methods give large controller gain and short integral time, which isn2t conducive to chemical engineering applications. $he I" method relates to closed-loop control and doesn2t ha ve overshooting or oscillatory behavior. $he $he I" methods however are very complicated for systems with first first order dead time.
uto Tu Tune ne &ariation $he auto-tune variation (#$F) (#$F) techni/ue is also a closed loop method and it is used to determine two important system constants ( P P u and K and K u for e+ample). $hese values can be determined without disturbing the system and tuning values for PID are obtained from these. $he #$F #$F method method will only work on systems that have significant dead time or the ultimate period, P period, P u, will be e/ual to the sampling period.
"*a+ples ?or>ed out "*a+ple < Proble+ Aou2re Aou2re a controls engineer working for 1lawless Design company when your optimal controller breaks down. #s a backup, you figure that by using coarse knowledge of a classical method, you may be able to sustain development of the product. #fter ad5usting
the gain to one set of data taken from a controller, you find that your ultimate gain is 9.83@>. 1rom the ad5usted plot below, determine the type of loop this graph representsM then, please calculate K calculate K c, T i, and T d d for for all three types of controllers.
#olution 1rom the fact that this graph oscillates and is not a step function, we see that this is a closed loop. $hus, the values will be calculated accordingly. e2re given the Cltimate gain, K e2re gain, K u 4 9.83@>. 1rom the graph below, we see that the ultimate period at this gain is P is P u 4 ;.3@
1rom this, we can calculate the K the K c, T i, and T d d for for all three types of controllers. $he results are tabulated below. (esults were calculated from the Kiegler-7ichols closed-loop e/uations.)
?or>ed out "*a+ple / Proble+ Aour Aour partner finds another set of data after the controller breaks down and decides to use the ohen-oon method because of the slow response time for the system. $hey also noticed that the control dial, which goes go es from =-@, was set at 8 instead of 0. %uckily the response curve was obtained earlier and is illustrated below. 1rom this data he wanted to calculate K calculate K c, T i and T d d . Nelp him to determine these values. 7ote that the y-a+is is percent change in the process variable.
#olution In order to solve for K for K c, T i and T d d, you must first determine %, S p, and $. #ll of these values may be calculated by the reaction curve given.
1rom the process reaction curve we can find that' %48 $ 4 00 S p 4 =.:: (::Q)
7ow that these three values have been found 7 and may be calculated using the e/uations below. 7 4
4 Csing these e/uations you find that 7 4 .=: 4 =.3? e also know that since the controller was moved from 0 to 8, so a 3==Q 3 ==Q change. P 4 3.== e use use these values to calculate K calculate K c, T i, and T d d , for the three types of controllers based on on the e/uations found in $able $able 8.
Tuning the para+eters of a PID controller on an actual syste+ $here are several ways to tune the parameters of a PID controller. $hey involve the following procedures. 1or each, name the procedure and e+plain how the given measured information is used to pick the parameters of the PID controller. @uestions a. $he controller is set to P only, and the system is operated in Bclosed-loopB, meaning that the controller is connected and working. $he gain is tuned up until a resonance is obtained. $he amplitude and fre/uency of that resonance is measured.
b. $he system is kept in Bopen-loopB mode, and a step-function change is manually made to the system (through a disturbance or through the controller itself). $he resulting response of the system is recorded as a function of time. nswers a. e will use the Kiegler-7ichols method. !i4=.:!u !u is the ultimate gain when the system started oscillating.
b. e e will use the ohen-oon method.
e can locate the inflection point of the step function and draw a tangent. Tdead is is located at the crossing of that tangent with t, and T is located at the cross of the tangent with "(t)
%ultiple Choice @uestion < hich of the following do you *D during du ring the Kiegler-7ichols "ethodU a. b. c. d.
K c i K o d
#nswer'
%ultiple Choice @uestion / 1or the Kiegler-7ichols "ethod, it is important to' a. b. c. d.
1ind a gain that produces damped oscillation et P and I controllers to 6ero ecord the period of oscillation alculate T c
#nswer'#,
#ageAs Corner Powerpoint lides without narration
Powerpoint lides without narration
!eferences
•
vrcek, illiam A., "ahoney, Donald P., Aoung, &rent . # eal $ime #pproach to Process ontrol, 3nd *dition. Hohn iley V ons, %td. #strom, !arl H., Nagglund, $ore., #dvanced PID ontrol, I#, $he Instrumentation, ystems and #utomation ociety. B#$ Kiegler-7ichols $uning,B http'<
•
Page
•
•
•
•
Discussion Fiew source Nistory
•
%og in
• •
$avigation • • • • •
$e+t home 3==; $e+t #bout *diting help ecent changes
#earch
Toolbo* • • • • •
hat links here elated changes pecial pages Printable version Permanent link
•
$his page was last modified on 3; Hanuary 3=08, at =>'98. $his page has been accessed 8@?,8:0 times. ontent is available under reative under reative ommons #ttribution #ttribution 8.= Cnported %icense. %icense. Privacy policy #bout ontrolsi ontrolsiki ki Disclaimers
•
#&C$
•
I
•
I7D*W
• • • • •
•
7*W$ X
•
I7$DC$I7
•
CI* CI * 7$ 7$% %
•
"$ "$ P P**D **D
•
"$ "$ P PI$I I$I7 7
•
CP*7I7
•
I7F*$*D I7F* $*D P*7 P*7DC%C DC%C" "
•
#I#1 #I #1$ $ PI$ PI$N N
•
% %% V &*#"
Introduction: !oot ocus Controller Design In this tutorial we will introduce the root locus, show how to create it using "#$l#&, "#$l#&, and demonstrate how to design feedback controllers using the root locus that satisfy certain performance criteria.
!ey "#$%#& "#$%#& commands used in this tutorial are' feedback , locus , step , sisotool
Contents • • • • •
losed-%oop Poles Plotting the oot %ocus of a $ransfer 1unction hoosing a Falue Falue of ! from the oot %ocus losed-%oop esponse Csing I$% for oot %ocus Design
Closed-oop Poles $he root locus of an (open-loop) transfer function is a plot of the locations (locus) of all possible closed-loop poles with proportional gain K and unity feedback.
$he closed-loop transfer function is'
(0) and thus the poles of the closed-loop poles of the closed-loop system system are values of such that . If we write
, then this e/uation has the form'
(3)
(8) %et 4 order of and that appears in it).
4 order of
(the order of a polynomial is the highest power of
e will will consider all positive values of K. In the limit as loop system are or the poles of . In the limit as closed-loop system are or the 6eros of .
, the poles of the closed, the poles of the
7o matter what we pick K to be, the closed-loop syste+ +ust always have poles , where is the number of poles of . The root locus +ust have branches , each
branch starts at a pole of and goes to a 6ero of . If has more poles than 6eros (as is often the case), and we say that has Beros at infinity . In this case, the limit of as is 6ero. $he number of 6eros at infinity is , the number of poles minus the number of 6eros, and is the number of branches of the root locus that go to infinity (asymptotes). ince the root locus is actually the locations of all possible closed-loop poles, from the root locus we can select a gain g ain such that our closed-loop system will perform the way we want. If any of the selected poles are on the right half plane, the closed-loop system will be unstable. $he poles that are closest to the imaginary a+is have the greatest influence influence on the closed-loop response, so even though the system has three or four poles, it may still act like a second or even first order system depending on the location(s) of the dominant pole(s).
Plotting the !oot ocus of a Transfer Transfer 5unction onsider an open-loop system which has a transfer function of
(9) Now do we design a feedback controller for the system by using the root locus methodU ay our design criteria are :Q overshoot and 0 second rise time. "ake a "#$%#& "#$%#& file called l!m. *nter the transfer function, and the command to plot the root locus' s = tf('s'); s.s = (s + )/(s*(s + 3)*(s + 13)*(s + 2)); locus(s.s) ais(7-22 -13 138)
Choosing a &alue of ) fro+ the !oot ocus $he plot above shows all possible closed-loop pole locations for a pure proportional controller. bviously not all of those closed-loop poles will satisfy our design criteria, $o determine what part of the locus is acceptable, we can use the command sid(; sid(
n the plot above, the two dotted lines at about a 9: degree angle indicate pole locations with 4 =.?M in between these lines, lines, the poles will have E =.? and outside outside of the lines lines =.?. $he semicircle indicates pole locations with a natural fre/uency 4 0.@M inside the circle, 0.@ and outside the circle E 0.@. oing back to our problem, to make the overshoot less than :Q, the poles have to be in between the two white dotted lines, and to make the rise time shorter than 0 second, the poles have to be outside of the white dotted semicircle. o now we know only the part of the locus outside of the semicircle and in betwen b etwen the two lines are acceptable. #ll the poles in this location are in the left-half plane, so the closed-loop system system will be stable. 1rom the plot above we see that there is part of the root locus inside the desired region. o in this case, we need only a proportional controller to move the poles to the desired region. Aou can use the locfind command in "#$%#& "#$%#& to choose the desired poles on on the locus' 7k"poles8 = locfind(s.s)
lick on the plot the point where you want the closed-loop pole to be. Aou Aou may want to select the points indicated in the plot below to satisfy the design criteria.
7ote that since the root locus may have more than one branch, when you select a pole, you may want to find out where the other pole (poles) are. emember they will affect the response too. 1rom the plot above, we see that all the poles selected (all the BYB signs) are at reasonable positions. e can go ahead and use the chosen K as our proportional controller.
Closed-oop !esponse In order to find the step response, you need to know the closed-loop transfer function. Aou Aou could compute this using the rules of block diagrams, or let "#$%#& "#$%#& do it for you (there is no need to enter a value for K if the locfind command was used)' K = 3; s.s?cl = feedback(K*s.s"1) s.s?cl = 3 s + 2@3 -------------------------------------s^@ + @ s^ + @3 s^2 + 1>3 s + 2@3
Continuous-time tansfe function!
$he two arguments to the function feedback are the numerator and denominator of the open-loop system. Aou need to include the proportional gain that you have chosen. Cnity feedback is assumed. If you have a non-unity feedback feedbac k situation, look at the help file for the "#$%#& "#$%#& function feedback, which can find the closed-loop transfer function with a gain in the feedback loop. heck out the step response of your closed-loop system' step(s.s?cl)
#s we e+pected, this response has an overshoot less than :Q and a rise time less than 0 second.
sing #I#OTOO for !oot ocus Design #nother way to complete what was done do ne above is to use the interactive "#$%#& "#$%#& CI called sisotool . Csing the same model as above, first define the plant, .
s = tf('s'); plant = (s + )/(s*(s + 3)*(s + 13)*(s + 2));
$he sisotool function can be used for analysis and design. In this case, we will focus on using the oot %ocus as the design method to improve the step response of the plant. $o begin, type the following into the "#$%#& "#$%#& command command window' sisotool(plant)
$he following window should appear. $o $o start, select the tab labeled (raphical Tuning. ithin this window, turn off Plot / and make sure Plot < is the oot %ocus and verify that Open oop < is selected. 1inally, click the button labeled #how Design Plot to bring up the tunable oot %ocus plot.
In the same fashion, select the tab labeled nalysis Plots . ithin this window, for Plot <, select #tep. In the Contents of Plots subwindow, select Closed oop r to y for Plot <. If the window does not automatically pop up, click the button labeled #how nalysis Plot .
$he ne+t thing to do is to add the design re/uirements to the oot %ocus plot. $his is done directly on the plot by right-clicking and selecting Design !euire+ents , $ew. Design re/uirements can be set for the ettling $ime, the Percent vershoot, the Damping atio, the 7atural 1re/uency, or a egion onstraint. $here is no direct re/uirement for ise $ime, $ime, but the natural fre/uency can be used for this.
Nere, we will set the design re/uirements for the damping ratio and the natural fre/uency 5ust like was done with sid. ecall that the re/uirements call for 4 =.? and 4 0.@. et these within the design re/uirements. n the p lot, any area which is still white, is an acceptable region for the poles. Koom into the oot %ocus by right-clicking on the a+is and select Properties , then click the label i+its. hange the real a+is to -23 to 3 and the imaginary to -2!3 to 2!3 . #lso, we can see the current values of some key parameters in the response. In the tep response, right-click on the plot and go to Characteristics and select Pea> !esponse . Do the same for the !ise Ti+e. $here should now be two large dots on the screen indicating the location of these parameters. lick each o f these dots to bring up a screen with information. &oth plots should appear as shown here'
#s the characteristics show on the tep response, the overshoot is acceptable, but the rise time is incredibly off. $o fi+ this, we need to choose a new value for the gain K. imilarly to the locfind command, the gain of the controller can be changed directly on the root locus plot. lick and drag the pink bo+ on the origin to the acceptable area where the poles have an imaginary component as shown below.
#t the bottom of the plot, it can be seen that the loop gain has been changed to 8;0. %ooking at the tep response, both of the values are acceptable for our re/uirements.