Copyright CO> IFAC Digital Control: Past, Present and Future of PID Control, Terrassa, Spain, 2000
DIRAC: A DIRECT ADAPTIVE CONTROLLER
Robin DE KEYSER
Gent University. Department ofControl Engineering Technologiepark 9. B-9052 GENT / BELGIUM Email:
[email protected]
Abstract: This paper presents a simple method for automatic tuning of PlO controllers. It is called DIRAC: "DIRect Adaptive Control". Auto-tuning and adaptation of
regulators remains a topic of continuing development in control engineering. The reason is twofold: it is a fascinating field of research and it has important potential for practical applications in industry. An algorithm is described which belongs to the class of direct adaptation, in the sense that the controller parameters can be calculated without a priori process identification. The method is both easy to understand and simple to apply. It can also be used on more general controller structures than PlO. Many simulation results are included, illustrating the PlO-tuner on a set of systems with a broad range of typical dynamic characteristics. These examples give an indication that DIRAC is a useful member in the large family of automatic tuning algorithms. Copyright © 2000 IFA C Keywords: Adaptive Control, Autotuners, Estimation, Industrial Control, Model-free Tuning, PlO Control, Self-tuning Control.
I. INTRODUCTION Another class of automatic tuning methods was specifically dedicated to PlO controllers and its development was started by Astrom' s research group with the seminal work on the relay auto-tuner at the end of the eighties (Astrom and Hagglund, 1995). Many survey papers on selftuning, auto-tuning and adaptive PlO controllers appeared in the control literature (Bueno et aI., 1991; Gorez, 1997) although it is obvious that no single survey could capture the vast amount of existing methods.
During the last decades, an ever-growing list of algorithms for automatic tuning of controllers has been published in the control literature. Most of the original methods were based on the principle of identification and control: in a IsI step the unknown parameters of a postulated process model are estimated; in a 2° step these estimated parameters are used to design a controller, possibly constrained to the PlO-structure. In some specific cases, it was possible to estimate directly the controller parameters, e.g. the selftuning regulator; in these cases however, the controller structure/complexity was generally a result of the method, i.e. it was not specified a priori and generally it had no PlO-structure. These methods were developed in the era of adaptive control (Astrom & Wittenmark, 1995).
A new approach to direct methods for automatic PID tuning has been developed in the nineties. These methods consist essentially of iterative search procedures: controller parameters are adjusted until some closed-loop performance conditions are met. No process model is required, so these methods are called model-free tuning, i.e. signal-based in contrast to model-based (Hjalmarsson et aI., 1998).
173
The DIRAC algorithm presented in this paper can be considered as an auto-tuning as well as an adaptation method. It can be used off-line, for initial tuning of a regulator, or on-line for continuous adaptation. It can be applied to PID controllers on the one hand, but also to more general controller structures on the other hand. The theory and the examples in this paper will however be restricted to the PID controller structure. The method does not require the identification of the system under control: specification of a process model or estimation of unknown process parameters is not necessary. Moreover, the controller structure is not a result of the method: it can be specified a priori. In this sense, this method can be categorized as a model-free tuning method.
Notice that we do not make any further assumptions about the structure of the process p(q-I). Later on we will see that the transfer function operator p(q-I) will disappear in the algorithm; this implies that the method can even be used on processes which cannot be described by a transfer function (e.g. nonlinear processes).
In section 2 the DIRAC principle is described; it is easy to understand. Moreover it is also simple to apply, which will be shown with some implementation details in section 3. Some pending questions and ideas, which open new horizons for further research, will also be mentioned there. Section 4 presents the results of many examples; they show that reasonably good performance can be obtained even with default values of the design parameters. This is an important aspect from the practical point of view: the ratio 'controller performance/design effort' is quite high.
The controller tuning task can thus be summarized as follows: find the 3 controller parameters in C(q-I) such that the closed-loop transfer function is 'more or less equal' to the desired reference model R(q-'). Using (5), this means:
The desired performance for the closed loop will be specified by a reference model R(q-'). This reference model is given a priori by the designer; it can be used to specify the desired characteristics of the control loop, e.g. the speed (bandwidth).
The 1sI approach, which is trivial, would be to solve for the unknown controller:
2. THE 'DIRAC' PRINCIPLE The standard PID control loop is shown in Fig. 1.
There are 2 reasons why this approach will be unsuccessful: • the process p(q-I) is unknown (and we don't want to identify it); • even if p(q-I) would be known, this would lead
Fig. 1: Basic PID control loop. As we are dealing with discrete-time control, the PID controller transfer function is given by:
to a general transfer function for C(q-I) and not to a 2nd order polynomial (which is required to obtain a PID controller). (notice that these inconveniences are the reason why we have used earlier the expression 'more or less in the equal' and why we use the notation mathematical expressions).
u(t) =u(t -1) + coe(t) + c1e(t -1) + c2 e(t - 2) (1)
with the error: e(t) = w(t) - yet)
(2)
=
Using shift-operator notation (q-Ie(t) = e(t -1», this can also be written as:
Instead of following this trivial but dead-end road, let us rewrite expression (7) as:
(3)
The crucial step consists of the following idea: both sides of equation (8) are expressions in the shift operator q.l, so we can apply this expression to the time signal u(t):
Assuming for a moment that the process can be described by an (unknown) transfer function: yet) = P(q-I)U(t) (4) this leads to the closed-loop transfer function:
174
Using (4), it can be observed that the factor p(q-I )u(t) in the left-hand side of (9) can be replaced:
data-gathering experiment, which is an important advantage from the practical point of view. During the description of the method in section 2. it has been assumed that C( q -I ) is a 2nd order polynomial in the shift operator. This corresponds to a PlO controller structure. The strategy can however also be applied to more simple controller structures (P, PI, PO) or to more complex structures (e.g. phase-
and the unknown process p(q-I) has disappeared! Defining now the filtered signals: u j(t) ;:: (1- q-')R(q-')U(t)
leadllag, where C( q -I) becomes a transfer function instead of a polynomial). The idea can even be extended to nonlinear controllers: instead of estimating the parameters of the linear operator
(11)
{ Yj(t) ;:: (1- R(q-'»y(t)
C(q -I), we estimate those of a nonlinear operator,
and introducing an error/residue signal c(t), the equation (10) can be transformed to:
e.g. the weights of a neural network. The design transfer function R(q-I) (the reference model) plays a crucial role. The reference model expresses the 'desired closed-loop behaviour'. Many different choices for R( q -I ) are possible; the designer has a large degree of freedom but he should not tumble into some traps.
The objective is now to estimate the parameters in the polynomial C(q-I) such that the errors c(t) are minimized. This is a standard problem that can be solved (either off-line or on-line) by a gradientsearch technique, a least-squares estimator or any other parameter estimation method (Ljung, 1987). Notice that a least-squares estimator gives unbiased estimates even if the signal c(t) is colored noise, as
We give here some guidelines, although the list is not exhaustive: • if the controller contains integral action, the steady-state error between w(t) and y(t) will be zero; this must be reflected in the closed-loop gain, which should be I (i.e. R(l) == 1);
there is no recursion of uf (t) in equation (12).
•
The DIRAC approach is both easy to understand and simple to apply, as is shown in Fig. 2. Some important implementation details are given in the next section, together with a few ideas for genelarization and some unsolved questions which can stimulate further research.
similarly, if the process itself contains an integrator and also the controller has integral action, we have a type-2 control loop (double integrator); we leave it as an exercise for the reader to design the conditions for an appropriate R(q-I) ;
•
EstirmteC Ur ' - - - - - - - - - '
•
if the process contains a dead-time, it is well known that also the closed-loop will have this dead-time between w(t) and y(t), so also R(q-I) should reflect the presence of a dead-time (experience shows that an exact knowledge of the dead-time is not necessary; over-estimation is safer than under-estimation) ; if the process is nonminimum-phase, also the closed-loop will be non-minimum phase; again this should be reflected in the reference model R(q-I).
u
Process
y
For a minimum-phase process with dead-time and no pure integrator, a simple but effective choice for R(q-I) is given by:
Fig. 2: Block-scheme of the DIRAC strategy
R( -I) q
3. IMPLEMENTATION ASPECTS Notice that the DIRAC method can be used either in open-loop or in closed-loop. The PlO-controller does not necessarily have to be operational during the
(l-a)"q-d (l-aq-I)"
withn=2 .. ·4;a =0.6···0.9 d = (approximate) process dead - time
175
(13)
and the sampling period was 1'. = 0.1 . The results can be observed in Fig. 4 as a function of the speed design parameter r CL • As a reference, the speed of the uncontrolled process is shown in Fig. 3.
The value of n depends on the dynamical complexity (order) of the process. The value of a. (the only real design parameter left) can be used for the usual tradeoff between closed-loop speed (bandwidth) and overshoot. The influence of these design parameters will be further illustrated in the next section. Notice that all parameters can be adapted on-line during the commission phase or operational phase of the regulator.
Proce.. unit atep reapon•• 10r--~-~--~-~:::==9
9
8
Although the reference model R(q-') has been presented here as a transfer funtion, a similar DIRAC idea can be applied to more general structures, e.g. a nonlinear reference model implemented as a neural network, which might result in a more performing controller.
6 5 4
20
Of course also some open questions remain at this moment: • the relationship between the DIRAC strategy and other auto-tuning/adaptive methods is an interesting topic for further research; • also the stability and convergence properties of the method have not yet been investigated; • guidelines for the selection of the reference model can be further explored; • the effect of process noise and disturbances on the parameter estimator should be further analysed.
40
60
60
100
Time in lamplel (Tl e O.l)
Fig. 3: Process step response (example 1)
Clo.ed-Ioop step r••pons. for d;ffer.nt speed
plramet.,..
1.2
4. EXAMPLES -0.2 0:----:2'="0--""74o:----76o:----:'::8oC--~100
In all examples, the estimation of the PID parameters
Time in IImplel (Tl e O.l)
in C(q -1) has been done ofJ-line with a least-squares parameter estimator. During the data-gathering experiment, a random binary signal u(t) has been sent into the process in order to obtain an output signal y(t) necessary for further processing according to the DIRAC algorithm. The reference model has been chosen according to equation (13), unless mentioned otherwise.
Fig. 4: Closed-loop step response for t'CL = 0.2; 0.4; 0.6
4.2 Example 2. The process has high-order dynamics and contains a pure integrator:
4.1 Example 1. (16)
The process (considered unknown and only given here as a reference) has high-order dynamics, presented by the continuous-time transfer function: This is a rather difficult process to control, because of the double integrator (1 in the process, 1 due to the controller I-action).
(14)
The reference model (continuous-time version) has been chosen as: The reference model has been chosen according to the continuous-time version of(13):
1+4t'CL s (l+t'CL S )4
(15)
and the sampling period was 1'. = 0.1 .
176
(17)
The somewhat peculiar choice of (17) is due to the fact that we are dealing with a type-2 control loop: the closed-loop system can track a ramp-setpoint without error and this should be reflected in the reference model.
The results can be observed in Fig. 8 as a function of the speed design parameter TCL . As a reference, the step response of the process is shown in Fig. 7, clearly illustrating the dead-time. Process unit Itop relponle
The results can be observed in Fig. 6 as a function of the speed design parameter T CL • As a reference, the impulse response of the process is shown in Fig. 5. Process
un~
0.9 0.8 0.7 0.8
impulse response
0.5 0.2 0.18
(
0.4
0.16
0.3
0.14
0.2
0.12
0.1
°0~--L..----:':50:-----:-10~0----:1::-50=---~200
0.1
Time in slmples (Ts-0.1)
0.08 0.06
Fig. 7: Process step response (example 3)
0.04
002 ) °O'-'----5...0 ---~100~---15O~----=-'200
Closed-loop step response Ior differem speed parameters
1.2
Time in samples (Ts=0.1)
0.5
0."
Fig. 5: Process impulse response (example 2) 0.8
0.8
Closed·loop stepresponse for different speed parameters 1.4
0.4
1.2 0.2
o 0.8
· 0 . 2 : ' - - - - - - - " - - -.........---~------' o 50 100 150 200 Time in aamples (Ts=0.1) .'----- ... _--_..... _. ._..-
-_
0.6
0."
__
Fig. 8: Closed-loop step response for TCL =0.3;0.4;0.5
o
50
~
__
~
01...lL_ _
~
0.2
100 150 Time in samples (Ts-0.1)
_ _....J
200
4.4 Example 4.
Fig. 6: Closed-loop step response for T CL
The process has a difficulty because of its nonminimum-phase character:
= 0.5; 1.0; 1.5
4.3 Example 3.
(20)
The process is simple but it has an important timedelay, which makes PID-tuning difficult: The sampling period was 1'. =0.1 and a delay of I time unit has been introduced in the reference model to reflect somehow the initial inverse-response due to the nonminimum-phase zero:
-r~s
_e__ with T= T d = 2 1 + 1-" The sampling period was model has been chosen as:
(18)
1'. = 0.1 and the reference e
-J
(21)
(19)
The results can be observed in Fig. 10 as a function of the speed design parameter T CL • As a reference,
177
the step response of the process is shown in Fig. 9, clearly illustrating the nonminimum-phase (inverse response) effect.
Proce•• unit step re.pon ••
0.45 0.4 0.35 0.3
Process untt atep r••pon•• 0.7r----~---===-------__,
0.25
0.6
0.2 0.15 01 0.05 0
0
100
50
Time In Ilmple.
er.-3)
150
200
Fig. 11: Process step response (example 5) 50
100
150
200
Time in lample. (T.-0.1)
Clo.ed.loop step r••pon,. for different speed paremete,.. 1.2
Fig. 9: Process step response (example 4) Clated-loop step re.ponse for different speed plr.metef.
1.2
°0LL---~50-----1-0-0---1~50:-----:-200 Time in ••mple. (T.-3)
-
50
100
150
.-
Fig. 12: Closed-loop step response for 'CL = 5; 10; 15
200
Time In ••mple. (T.-0.1)
Fig. 10: Closed-loop step response for 'CL = 0.3; 0.4; 0.5
5. CONCLUSIONS A simple method for automatic tuning of PlOcontrollers has been presented. It can also be applied on-line as the core of an adaptive control strategy. The algorithm is simple to understand and easy to implement. It has also potential for further extension to more advanced controllers than PlO (e.g. nonlinear control). Simulation examples illustrate that the ratio « control performance/design effort» is good, which makes it a valuable candidate for industrial use.
4.5 Example 5. The process is highly oscillatory (low damping factor):
(22)
REFERENCES
The sampling period was Ts =3 and the default reference model has been chosen:
AstrOm KJ., B. Wittenmark (1995). Adaptive Control, AddisonWesley. AstrOm KJ., T. Hligglund (1995). PID Controllers: Theory. Design and Tuning. Instrument Society of America, Research Triangle Park, NC, USA. Bueno S., R. De Keyser and G. Favier (1991). Auto-tuning and adaptive tuning ofPID controllers. Journal A 32(1), 28-34. Gorez R. (1997). A Survey of PlO Auto-Tuning Methods. Journal A 38(1), 3-10. Hjalmarsson H., M. Gevers, S. Gunnarson and O. Lequin (1998). Iterative Feedback Tuning: Theory and Applications. IEEE Control Systems Magazine 18(4), 26-41. Ljung L. (1987). System Identification - Theory for the User. Prentice Hall, Englewood Cliffs, NJ.
(23)
The results can be observed in Fig. 12 as a function of the speed design parameter -rCL' As a reference, the step response of the uncontrolled process is shown in Fig. 11, clearly illustrating its oscillatory nature.
178