Copyright lillFAC Digital Control: Past, Present and Future of PlO Control, Terrassa, Spain, 2000
ADAPTIVE DESIGN OF PlO CONTROLLERS BASED ON AN ALTERNATIVE METHOD TO ROOT LOCUS * M. Martinez * J. V. Salcedo * and J. Muiioz *
* Department o/Systems Engineering and Control, Universidad Politecnica de Valencia, Camino de Vera 14, P.D. Box 22012 E-46071 Valencia, Spain. Tel: +34-963879571. Fax: +34-963879579. E-mail:
[email protected]
Abstract: Root locus is the technique normally used in order to design PID controllers. However its application for the design of industrial PID controllers it is not so spread out, due to its graphic nature. In this paper an alternative technique to design PID controllers is proposed, based on the expression of the characteristic equation as real and imaginary components. This technique has a simple implementation in a computer and it provides the same controller as the root locus technique. Additionally two adaptive techniques which design PID's with real specifications closer to desired ones than root locus have been developed: 1) Tuning of the ratio "real part of closed loop dominant poles / location of the zero close to the integrator" in PI and PID controllers. 2) Displacement of dominant closed loop poles. Copyright © 2000 IFAC Keywords: Process control, industrial control, PID, root locus, tuning characteristics.
I. INTRODUCTION
r
-I
Root locus, developed by Evans in 1948 (Puente, 1982), is a graphic method based on a set of rules which allows to obtain the evolution of the closed loop poles of a linear process with a variable gain as controller. As it is shown in figure I, G(s) is the transfer function of the linear process, H (s) is the transfer function of the sensor, r is the reference, u is the control action and y is the output of the process. Closed loop characteristic equation is:
1 + KGp(s)H(s) = 0
+ ---4. .
--I
,-I
H(s)
1·>--------,
Fig. I. Closed-loop with variable gain K locus must intersect these points, lines or regions derived from specifications. In general, this situation will not be possible, requiring the modification of the original root locus introducing additional zeros and/or poles, until intersection is achieved (Blasco, 1996; Morilla, 1990a).
(I)
The roots ofthis characteristic equation are the closed loop poles. If the value of K changes the closed loop poles will change accordingly.
PlO REGUlATOR
.~e1
The desired dynamic specifications can be mapped to points, lines or regions in the complex plane. So that closed loop verify these specifications, the root
! !
*
Partially supported by the project TAP96-1090-C04-02 C1CYT, Spain.
GR(s)
PROCESS
I
U
I H(s)
.,
Gp(S)
~-
Fig. 2. Closed-loop with PID regulator
199
~y
2. PROPOSED ALTERNATIVE METHOD
With this last equation the PID regulator is obtained in real and imaginary components. From these components, the necessary regulator and their parameters must be decided. There are different possibilities:
In this paper an alternative method based on the use of the closed loop characteristic equation is proposed. The characteristic equation of the system in figure 2 is (Ogata, 1993): 1 + GR(s)Gp(s)H(s) = 0
= O. If there is not imaginary component, it would be enough with a proportional regulator P. Real component establishes the gain of the proportional regulator:
(1) Imag(GR)
(2)
Given then desired dynamic specifications the dominant poles satisfying the characteristic equation (2) are obtained. The most common dynamic specifications in the time domain are (Puente, 1982): • • • •
GR
= K = Real(GR(s))!5=dp
(9)
Once the value of K has been established the steady-state behaviour must be verified calculating the position, velocity and acceleration errors (Blasco, 1996). For example, the position error is calculated using the following expressions:
Time constant T (lst order processes). Peak time t p . Settling time t 5' Overshoot 6.
1 e --p 1 + kp
These specifications are related with the following specifications in the complex plane:
kp = limGR(s)Gp(s)H(s)
(10)
5-+0
• • • •
Damping factor a. Frequency wp . Natural frequency wn . Damping coefficient~.
If the regulator verifies steady-state specifications, the P regulator will be enough. If it is not the case, a proportional-integral regulator (PI) will be necessary:
GR(S) = K(s 7r ; t s (98~) tp = 10 -4 ., = e- v'f:~2 wp a
(3)
When a first order system dynamic is desired, it is enough to set the desired constant time T, having one dominant closed loop pole located in:
dominant pole
= dp = --T1
Real (-
(5)
Once established the desired dominant poles, the PID regulator will be analytically calculated from the closed loop characteristic equation (2) so that: 1 + GR(s)Gp(s)H(s)
=0
(6)
is satisfied for the desired dominant poles (Morilla, 1990b).
(7)
=-
= Real(GR)!s=dp
= K(s
+ a) I
s
(12)
5=dp
(15)
To obtain K and b, the previous equation is equalled to the real and imaginary components ofPD regulator, which have been obtained in the equation (8):
Gp(S~H(S) 15=dP + jlmag(GR)!s=dp
)
GR(s)ls=dp = K(s + b)ls=-u+iw p = =K(-a+b)+jKwp
In order to calculate the regulator, s must be replaced in the equation (7) by dp to guarantee that the desired dominant poles satisfy the characteristic equation:
GR(s)ls=dp
I
Replacing s by dp the real and imaginary components of regulator are obtained:
1
= - Gp(s)H(s)
1
Gp(s)H(s) s=dp
(14)
From previous equation, the following transfer function for the regulator is obtained:
GR(S)
(11)
In order to solve this problem, an approximate method is used: the value of K above calculated is kept, one pole at the origin is added to eliminate steadystate errors and one zero nearly this pole is also added in order to cancel its dynamics effects, so the desired specifications only will be satisfied partially. The criterion of location of this zero is: Real (dp) -a = ratio E [6,10] (13) ratio where ratio represents "real part of closed loop dominant poles / location of the zero close to the integrator" (2) Imag(GR) :j:. O. If there is imaginary component, it would be enough with a proportional-derivative regulator (PD). Transfer function of PD regulator is:
(4)
If a second order system dynamic is desired, it is required to establish two specifications in the time domain or in the complex plane domain, having two dominant closed loop poles located in:
dp = -wn~ ±jwn~ = -a ±jwp
+ a)
s When the PI regulator is designed, one equation with two unknowns K and a must be solved:
K(-a
+ b) = Real(GR)
Kwp = Imag(GR)
(8) 200
(16) (17)
As a result as the previous equation:
OIGlTAl. PlO
= Imag(G R)
K b_ - a
+
r
(18)
wp Real (GR) Imag(GR) wp
-.--e-~---u--~
----11
( 19)
= K(s + b)(s + a)
Closed loop block diagram with the digital PID regulator is shown in figure 3. The digital closed loop characteristic equation is:
When the PID regulator is designed, two equations with three unknowns K, b and a must be solved:
1 + GR(z)Gp(z)H(z)
= Real(GR(s))ls=dp
Imag ( K(s
1
+ b)(s + a) Gp(s)H(s) s
K(s
+ b)
(22)
~H( I
GRlz=dpz = - G p ( z ) z=dpz Z = Real(G R ) + jlmag(GR)
Replacing s by dp = -a
+ a)Gp(s)H(s)
(24)
wp b= a
(23)
+ jw p :
K= Im
Re
+ Imwp
4. DESIGN EXAMPLE Let be the process:
(25)
G(s) = S3
Im = -Imag ( (s Re
= -Real (
(s
+ a)G:(s)H(s) IS=dJ (26) + a)G:(S)H(S)
(30)
Once the real and imaginary components have been calculated, in order to design the correct regulator P, PI, PD or PID the methodology used in the design of continuous PID regulators must be also applied (section 2).
= 0
s
= - (s
(29)
To design the regulator z is replaced by the dominant pole in "z" plane dpz in the previous equation, obtaining its real and imaginary components, like in the design of the continuous PID regulator:
+ bl(s + a)) s=dp
In order to solve this problem, an approximate method is used: one pole at the origin and one zero (-a) close to this pole, located with the same criterion used for the PI regulator (13) are added. K and b are obtained solving the closed loop characteristic equation:
1 + K(s
(28)
= - Gp(z)H(z)
GR(z)
(21 )
= Imag(GR(s))ls=dp
=0
The transfer function of the digital PID regulator is:
+ b](S + a)) s=dp =
Real ( K(s
~---- ---
(2) A digital model of the plant Gp(z) is obtained using a zero order hold with a sampling period T.
(20)
s
Hlzl
y
Fig. 3. Closed loop block diagram with the digital PID regulator
If this regulator verifies steady-state specifications, the PD regulator will be enough. If it is not the case, a proportional-integral-derivative regulator (PID) will be necessary, the transfer function ofthe PID regulator is:
GR(s)
DIGITAl. PROCESS
REGlAATOR
2(s + 1) H(s) + 2s 2 + 3s + 4
= 1
(31)
Design a PID regulator using the alternative method so that the following specifications are verified: (I) Maximum position error 5%. (2) Peak time t p = Is. (3) Settling time (98%) t s = 2.5s.
IS=dJ (27)
Both methods, the root locus and the alternative one, provide the same controller.
The closed loop desired dominant poles are: • Damping factor:
3. DESIGN OF DIGITAL PID'S
a
4
= -t = 1.6
(32)
s
• Frequency:
Digital PID's can be designed directly using this alternative method. Before applying this method, the following transformations must be done (Ogata, 1987):
wp
1r
= -t = 3.1416
(33)
p
=
(I) Using the transformation z esT the dynamic specifications of the "s" plane can be translated into specifications of "z" plane. T is the sampling period.
• Desired dominant poles:
dp
201
= -a ± jw p = -1.6 ± 3.1416j
(34)
In that conditions the system characteristic equation is (2):
=0
1 + G R (8)G(8)
(35)
Working out the value of regulator and replacing 8 by
dp the real and imaginary components of the regulator are obtained: 3
G R ( 8)
= __ 1_ = _ 8
+ 28 2 + 38 + 4 + 1)
(36)
= 3.5135 + 3.7629j
(37)
G(8)
GRls=dp
2(8
Since there exits imaginary component, it could be enough with a PD regulator:
G R(8) = K(s
+ b)
(38) Fig. 4. Example window of the software tool
K and b are calculated applying (18) and (19): K
= Imag(GR) = 3.7629 = 1.1978 3.1416
wp
b=
(j
+ Real(G R ) w Imag(GR)
= 1.6
+
3.51353.1416 3.7629
Finally the PID regulator designed is, thus:
GR(8) = 1.3148(8 + 4.148)(8
(39)
= _1_ 1+Kp
Kp
=
= 4.5334
5. SOFTWARE TOOL
(40)
The main advantage of the alternative method faced with the root locus is its simplicity to be implemented in a computer. Using this idea a software tool has been developed in Matlab (Mathworks, 1992) which implements this alternative method. This software tool has the following properties:
= hm G R (8)G(8) = 2.7149 s-+o
1 e p = - - = 0.2692 1 + 4.2
> 0.05
(41)
• It has a user interface based on menus (figure 4). • The elements of closed loop must be entered using theirs transfer functions (process and sensor). • Two kinds of desired dynamic behaviour can be selected: first order or second order systems. • This software can manage time and complex domain specifications. • Digital and continuous PID regulators can be designed. • It allows to analyse: open loop poles, closed loop poles, root locus, etc. • The real specifications obtained with the designed PID are compared with the desired ones. In particular both step responses are represented in a graph.
As the position error is biggerthan 5% a PID regulator will be necessary:
G (8) = K(8 R
+ b)(8 + a)
(42)
8
The a zero, close to origin, is located with a ratio of 6 accordingly with the expression (13):
-a
= Real(dp) =
-1.6
ratio
= -0.2667
(43)
6
K and b are obtained from the system characteristic equation replacing 8 by dp = -1.6 + 3.1416j: 1 + K(8
+ b)(8 + a) G(8) = 0
The PID obtained in the previous section is designed again using this tool. In figure 5 the step responses associated with the desired (ideal) specifications and the real specifications have been represented. The reasons which justify the differences between both step responses are:
(44)
8
+ b)
8
+ a)G(8) 8(8 3 + 28 2 + 38 + 4) 2(8 + 1)(8 + 0.2667) K(-l- 6 + 3.1416j + b) = 2 3 8(8 + 28 + 38 + 4) 2(8 + 1)(8 + 0.2667) s=-1.6+31416j = 3.3501 + 4.1304j K(8
= - (8
(45)
• The closed loop desired poles are supposed to be the dominant ones. • The closed loop transfer function have zeros which have not been designed in closed loop.
I
= -
K
= 1.3148
b
(47)
p
Next, the position error is calculated: ep
+ 0.2667)
8
= 4.148
In order to come closer to the desired specifications two adaptive methods have been developed:
(46)
202
Step Re.pan•• (I)
Step Response (II) ,.r-----,----r----,c--~--_r_----,--___,
f\ /"
12
Ideal response
:r~ (,r------_-_-=_--::_--::_c::_-=_-=_-=_-=_~~~~ __ ~ ---
I'
5°
8 :
Q.
8°
I
6 I
\""",
Real response
I I
Initial real response
04
02
o 0~--'---~--:3---4'---~----'------.J
o o,L-----:------:,'=""o----!;'S----:':20,-----:!2S Time (5)
Time (5)
Fig. 5. The step responses associated with the ideal specifications (continuous line) and the real specifications (dashed line).
Fig, 6. Step responses of the process for the ideal specifications (continuous line), the initial real specifications (dashed line) and the real specifications achieved with the tuning of the ratio (plus signed line),
• Tuning of the ratio: "real part of closed loop dominant poles / location of the zero close to the integrator" (equation (13)), in PI and PID regulators. • Displacement of the closed loop dominant poles.
• The aim of adaptation: to obtain a settling time close to desired one 2.58. These results are obtained: • Optimum ratio: 0.7. • PID regulator:
6, ADAPTIVE METHODS
GR(8) = 1.793(8 + 1.808)(8 + 2.282)
6.1 Tuning ofthe ratio Re(dp)/Ial
(48)
8
This method can be applied for PI and PID regulators only. Tuning the value of this ratio the real dynamic specifications can be optimized so that they come closer to the desired specifications. The methodology of this adaptive method has the next steps:
• The real specifications achieved: e p = 3.668,
=
0, t p
=
0.6218, t s
In figure 6 the step responses of the process for the ideal specifications, the initial real specifications and the real specifications achieved with the tuning of the ratio, respectively, are represented. The last one is closer to the step response for the ideal specifications than the step response for the initial real specifications.
(I) The aim of the adaptation is set. This aim can only be one dynamic specification or a compromise of several specifications. That adaptation is done by minimizing a tuning index. (2) The interval, over which the tuning of the ratio will be done, is set by the following parameters: • Minimum ratio of this interval. • Maximum ratio of this interval. • The ratio increase within the interval. (3) All the PID's of this interval are calculated analytically and automatically with the software tool. (4) The dynamic behaviour of the process with each PID is simulated using this tool when the reference is a step. (5) In each case the discrepancies between the real and the desired specifications are calculated. Using this discrepancies the value of the tuning index is obtained for each PID. (6) Finally the PID, which has the minimum value for the tuning index, has the optimum ratio.
6.2 Tuning by displacement of closed loop dominant poles This adaptive method can be applied to any PID regulator. Its methodology is very similar to previous one: (I) The aim of the adaptation is set. This aim can only be one dynamic specification or a compromise of several specifications. That adaptation is done by minimizing of a tuning index. (2) The surface, over which the displacement ofclosed loop dominant poles will be done, is rectangular and it is centered over the initial closed loop dominant poles. This one is set by the following parameters: • Grid: number of segments of each side of the rectangle, It must be even, • t:J.a: the increase of the damping factor. • t:J.w p : the increase of the frequency. (3) All the PID's of this surface are calculated analytically and automatically with the software tool.
Applying this adaptive method to the above process (31) with the following parameters: • Minimum ratio: 0.01, maximum ratio: 10 and ratio increase: 0.01. 203
(4) The dynamic behaviour of the process with each PID is simulated using this tool when the reference is a step. (5) In each case the discrepancies between the real and the desired specifications are calculated. Using this discrepancies the value of the tuning index is obtained for each PID. (6) Finally the PID, which has the minimum value for the tuning index, has the optimum location for the closed loop dominant poles.
St.p
"
r8 006
a••pon..
~...-
(Ill)
-------------
\-\' ~:.:I~::~~t~:~
by
d~acemenl 01 dominam po~
Inital real response
04
02
Applying this new adaptive method to the above process (31) with the following parameters:
°0~--:---'--~-~8--,~0-----:':12,--------:,':-4 ---:"6
Time (8)
• Grid: 20, b.CJ = b.w p = 0.05. • The aim of adaptation: to obtain a settling time close to desired one 2.58.
Fig. 7. Step responses of the process for the ideal specifications (continuous line), the initial real specifications (dashed line) and the real specifications achieved by the displacement of closed loop dominant poles (plus signed line).
These results are obtained: • Optimum closed loop dominant poles: -2.1 ± 3.6416j. • PlO regulator:
G (8) = 1.829(8+4.422)(8+0.35) R
• The software tool includes these adaptive methods also.
(49)
8
• The real specifications achieved: ep = 0, t p = 0.6278, t s = 8.778.
8. REFERENCES Blasco, F.X. (1996). Sistemas Automaticos. Notas de clase. Technical Report. Dept. Ingenieria de Sistemas Computadores y Automatica. Universidad Politecnica de Valencia. Etter, D. M. (1993). Engineeringproblem solving with MATLAB. Prentice-Hall. Mathworks, Inc. (1992). Manual de referencia de Matlab. Morilla, F. (I 990a). Controladores PID: ajuste de parametros. Automatica e 1nstrumentacion. Morilla, F. (1990b). Controladores PID: algoritmos y estructuras. Automatica e 1nstrumentacion. Nakamura, S. (1997). Analisis numerico y visualizacion grafica con Mat/ab. Prentice-Hall. Ogata, K. (1987). Discrete-Time Control Systems. MacGraw Hill. Ogata, K. (1993). 1ngenieria de Control Moderna. Prentice-Hall. Ogata, K. (1994). Designing Lineal Control Systems with MATLAB. Prentice-Hall. Puente, E. Andres (1982). Regulacion Automatica 1, tomos 1 y 11. Servicio de publicaciones de la E.T.S.I.I. de Madrid.
In figure 7 the step responses of the process for the ideal specifications, the initial real specifications and the real specifications achieved by the displacement of dominant poles, respectively, are represented. The last one is closer to the step response for the ideal specifications than the step response for the initial real specifications. Finally, comparing the specifications obtained with both adaptive methods, the method based on the tuning of the ratio provides a settling time closer to desired one than the method based on the displacement of dominant poles. Both methods can be applied for continuous and digital systems.
7. CONCLUSIONS • An alternative technique to root locus for the design ofPID regulators (for continuous and digital systems) has been developed. Both techniques provide the same controllers. • The main advantage of this new method is its simplicity of implementation in a computer. • A software tool, which implements this alternative technique, has been designed in Mat/ab. • Tools with similar properties can be used to design PID regulators in industrial environments due to its simplicity of use and because the operator does not need to know the theoretical basis of the design. • Two adaptive techniques have been developed to design PlO's with real specifications closer to the desired ones than the PlO's designed with root locus or this alternative technique. 204