Você está na página 1de 6

Technical Report

PERFORMANCE IMPROVEMENT OF
SMITH PREDICTOR THROUGH
AUTOMATIC COMPUTATION OF
DEAD TIME

VERONESI Massimiliano *1

It is known that the classical tuning formula for typical Proportional-


Integral-Derivative (PID) controllers in general provides unsatisfactory results for
industrial plants where the time delay exceeds the dominant lag time. For this
reason, alternative strategies have been studied in order to cope with this problem
and, in this context, the most popular scheme is the Smith Predictor. In this paper
the theory behind this algorithm is explained and its implementation through YS170
controller language and CENTUM CS3000 Control Drawing Builder are presented
in order to verify their effectiveness in industrial environments. This approach
requires a good model of the process under control. In fact, the performance of the
Smith Predictor can decrease dramatically (become unstable) due to modelling
errors, especially for the dead time which, contrary to what would be expected, can
vary considerably depending on the working conditions (i.e. the fluid flow). In this
paper a simple adaptive law for the automatic tuning of the model time delay is
suggested. When this method is applied, the performance of the Smith Predictor is
easily improved due to the automatically tuned model dead time and the control
algorithm is capable of meeting variable working conditions.

INTRODUCTION (Single Input Single Output) process affected by dead time can be
described by a differential equation such as
x (t ) = f (x (t ); u(t ) )
I n process control it is not uncommon for systems to be affected
by dead times, due to material transfer times. This is evident
typically in pipelines. A fluid of density and flow rate w in a
where x(t) is the measured variable at time t, u(t) is the
manipulated variable and is the dead time.
(1)

section of pipe A the length of d takes the amount of time Considering the simpler and more popular linear case, (1) can
=Ad/w to cover the whole distance (see Figure 1).
This means the controller (human or digital) can only be
FIC
aware in retrospect of the effect of actions taken, and decisions
must therefore be based on previous situations, typically resulting
in troublesomely long oscillations around the steady state value.
In this case, however, we can take some countermeasures which = Ad/w
are not so complicated and do not stray far from the traditional
and popular PID control architectures. d
Switching to mathematical relationships, a first order SISO
Manuscript received March 3, 2003 Figure 1 Time Delay Due to the Fluid Transfer Time in a
Final manuscript received April 23, 2003 Pipeline
*1 Yokogawa Italia, Industrial Automation Department

Performance Improvement of Smith Predictor through Automatic Computation of Dead Time 25


d d
controller process
u y u y
y _ RPID(s) P(s)=G(s)e s y _ _ RPID(s) P(s)

Model Pm (s) R(s)


ym
s m
Gm(s) e s m
(
Gm(s) 1e )
z

if P(s)=Pm(s)
d

u
y _ RPID(s) G(s)e s y

G(s)

Figure 2 Equivalent Schemes for the Smith Predictor

be re-written as the PID parameters would be difficult, and lengthy trial-and-error


x (t ) = a x(t ) + b u (t ) (2) activities could cause heavy loads for the plants, possibly
which, by Laplace transformation, corresponds to the usual exposing them to danger. Moreover, disregarding this heavy load,
algebraic relationship in the complex variable s the final results would not be adequately satisfactory.
e s
x(s) = u ( s ) , where = -b/a and T = -1/a (3)
1 + sT THE SMITH PREDICTOR
Such an equation is used to describe all those processes with
dynamic behaviour that are dominated by a one time constant T A simple algorithm for control processes affected by dead
and a time delay (FOPDT: First Order Plus Time Delay). time is the one proposed by Hagglund (named Predictor-PI)(2) and
Referring to the simple PID formula based on the idea of decreasing the manipulated variable by an
1 de amount equal to all that was computed in the last seconds.
u = K p e + edt + Td
dt
(4)
Ti However the more popular scheme for control processes affected
where u is a manipulated variable, and e is an error (given by the by time delay was proposed by O. J. M. Smith(6) and is shown in
difference between a setpoint value and a measured variable), the Figure 2.
transfer function of the PID is: Let P(s)=G(s)e-s be the transfer function of the process and
RPID ( s ) = K p 1 + 1 + sTd
lets indicate the setpoint with y and a generic load disturbance
(5)
sTi with d.
From the previous equations it is clear that the control action This algorithm requires a minimal knowledge of the process
is computed as the sum of three terms and that, through the tuning to describe it through a transfer function (model)
of Kp, Ti and Td it is possible to give different weights to them in Pm ( s ) = G m ( s )e s m , (6)
order to achieve the desired performance for a closed loop m
where G m ( s ) = is a rational function of the complex
system. Proportional action has exactly the same trend in error; 1 + sTm
the integral action (proportional to the sum of the past errors) is variable s, which should approximate the process without
used to reset the steady state error; and the derivative action delay. The parameters of the model can be achieved by popular
(proportional to the error tendencies) can ultimately anticipate the identification experiences such as the one based on the open loop
future error behaviour during the transient. This last effect of the system response to a step change of the control variable.
derivative action, however, can not be useful if the process is As shown in Figure 2, the feedback is closed not on the
affected by dead time. Its action, in fact, is based on the process value y, but on the z variable, which has the same value
evaluation of something that has already started to happen. In this that y had m seconds earlier; and therefore it is in some ways a
case, the process variable starts to change after seconds and so prediction of the measure; that is why this control architecture
the derivative of the error remains zero throughout the duration of is called Smith Predictor.
the dead time. In other words the measured value does not contain So, the resulting controller transfer function is
adequate information to foresee the future. RPID ( s )
R( s) = (7)
The usual PID controllers are suitable for controlling stable 1 + RPID ( s ) Gm ( s ) (1 e s m )
process in which the /T ratio is small. In fact, if it is large, tuning The poles of the model are zeros of R(s) and so, if the model is

26 Yokogawa Technical Report English Edition, No. 35 (2003)


LD X1 ; measured value
LD Y1; ; control variable
LD P01 ; Tm
LAG ;
ST T01 ; T01 = (1/1 + sTm)Y1
LD P02 ; m
DED
-
LD T01
+
ST PV ; PV=X1 + (1-esP02)T01
BSC1 ; PID algorithm
ST Y1

Figure 3 Smith Predictor Realised through the YS170 Programming Language

a good approximation of the real process, the controller can shown. In the first one, the low level YS170 language was used,
perform a zero/pole cancellation independently by the values of while in the second one the algorithm is performed by the
the PID parameters. function blocks available in the CENTUM CS1000/3000 control
In fact, being D(s) the Laplace transformation of the load drawing builder. The DLAY-C block performs the transfer
disturbance, the following transfer functions can be computed as m
function (e s m 1) , and its output is added to the error
Y (s) RPID ( s ) P( s ) 1 + sTm
= (8)
Y ( s ) 1 + RPID ( s )Gm ( s ) (1 e s m ) + RPID P( s ) internally at the PID block (through the parameter VN). For this
reason the Compensation Gain (CK) of the PID block has to be set
Y (s) P( s) to -1. The meanings of the other variables are explained in the
= (9)
D( s ) 1 + RPID ( s )Gm ( s ) (1 e s m ) + RPID P( s ) figures themselves. In both cases the PID algorithm is performed
and so, if m=, by a single action (BSC for the YS170 and PID for CENTUM), as
Y (s) RPID ( s )G ( s ) dictated by the programming language.
= e s (10)
Y ( s ) 1 + RPID ( s )Gm ( s ) Specifically, in the PID block the INPUT COMPENSATION
option has to be selected in the Function Block Detail Builder /
Y (s) G( s ) Control Calculation Tab. Then the dead time is computed as the
= e s (11)
D( s ) 1 + RPID ( s )Gm ( s ) product of the parameter SMPL (available by DLAY-C tuning
Therefore, from a theoretical point of view, and with a good window) and the number of sample points which has to be set by
model (Gm(s)=G(s)), the PID controller can be tuned as it would engineers in the Function Block Detail Builder / Basic Tab.
be for a process without a time delay; thereby making it easy to It must be emphasized that in case the process has an
achieve its best performance. integrator (that is s=0 is a pole for the transfer function G(s)), the
Thanks to digital technologies, it is not so difficult to realise a Smith Predictor is not able to accommodate a load disturbance
Smith Predictor algorithm. Modern controllers have a rich library D(s) on the process input. In fact, it can be proved that in a steady
of parameters and function blocks with which it is easy to build a state the ratio between the process value and the load disturbance
transfer function; among them there are, for instance, the ones is proportional to the model gain and time delay. This means that
-s the integral of the load disturbance will not be compensated; or in
corresponding to 1 + sT and e operators.
other words, that the controller is not able to reset the steady state
In Figures 3 and 4, two examples of the Smith Predictor are error.

%%INPUT

IN

DTC OUT VN CONTR OUT


%%OUTPUT
DLAY-C PID
IN MV

Figure 4 Smith Predictor Designed with the Control Drawing Builder of CS1000/3000 Yokogawa DCS

Performance Improvement of Smith Predictor through Automatic Computation of Dead Time 27


1.6 y ym
1.5 y
1.4 Delay under-estimation
1.3
y 1.2
1.1
1 t t

0.9
0.8 m
0.7 Delay super-estimation
0.6 y
0.5
0.4 Delay correct estimation
0.3
0.2
0.1
t
0 tm
0 20 40 60 80 100 120 140 160 180 200
t [sec.] t

Figure 5 Ideal Trend Compared to the One Achievable with Figure 6 Graphical Representation of Equation (15)
50% Delay Estimation Mistake

d m
The most effective scheme for load disturbance
(3)
= K (y y m ) (K is a constant) (12)
compensation is the one proposed by Matausek, Micic . The idea dt
that is, starting from m ,
o
is to eliminate additional feedback by subtracting from the t
manipulated variable an amount proportional to the difference m (t ) = mo + K (y m ( ) y ( ) ) d (13)
between the process variable and its estimation, as provided by 0

the model. That difference, in fact, is by construction the best It is not difficult to understand the reasoning behind this
approximation of the load disturbance that we have after the dead formula.
In fact, if m < , during the transient between y1 and y2 > y1,
o
time.
the model response is faster than the process one, hence ym-y > 0
AUTOMATIC DETERMINATION OF THE DEAD for the most part of the time. Therefore, m being proportional to
that difference, it will grow from the initial value m to . On the
o
TIME VALUE
other hand, if m > , the model response will be slower than the
o

The performance of the Smith Predictor dramatically process one and so ym-y < 0 for an extensive period. Thus, due to
decreases (become unstable) due to modelling errors, especially the proposed adaptive law, m will decrease. Ultimately, when
for the dead time (m). This is very dangerous because it can vary y m=y, the derivative of m will become stable. Analog
widely depending on the working conditions (i.e. the fluid flow). consideration holds in the case of y2 < y1.
Lets consider, for instance, a simple FOPDT process with If Gm(s)=G(s) , by indicating with y the process variable not
T=1 sec. and =10T. A step change in the setpoint is applied and affected by delay, it holds that
then, when =100 sec, a load disturbance will be simulated. In y (t ) = y (t )
Figure 5 the trends achieved with 50% delay estimation (14)
y m (t ) = y (t mo )
mistakes are illustrated. The performances (achieved by re-tuning
Looking at Figure 6, if m > , it can be seen that
o
proportional gain and integral time) are worse than that of the
ideal situation in which =m. In fact, in case of under-estimation,
( )
t t

the PID algorithm will anticipate the action generating oscillation ( y( ) y


0
m ( ))d = y ( ) y ( mo ) d
0
around the steady state value. However, on the other hand, in case
t t mo
of super-estimation, the PID will be late and the approach to
setpoint will therefore be slow and hesitating.
=
0
y ( ) d y ( ) d
0
(15)
If it is not possible to measure the flow and thereby t

dynamically adapt the delay time value m in the algorithm, a filter = y (t )d


t mo
on the modelling error (y-ym) could be a countermeasure, but its
robustness is a drawback to the speed, especially for load Then, considering a simple FOPDT process, the open loop
disturbance rejection. Therefore it can be useful to find a way to response without dead time is
autonomously adjust m to . For such an achievement, the
y (t ) = 1 + e T
t
(16)
following adaptive law can be proposed:

28 Yokogawa Technical Report English Edition, No. 35 (2003)


1.4 1.2
dashed line
1.2 solid line dashed line 1
1
0.8 solid line
0.8
0.6 0.6
y

y
0.4 0.4
0.2
0.2
0
0
-0.2
-0.4 -0.2
0 200 400 600 800 1000 0 200 400 600 800 1000
t [sec.] t [sec.]
11 18
17
10
16
estimated dead time

estimated dead time


9 15

8 14
13
7 12
6 11
10
5
9
4 8
0 200 400 600 800 1000 0 200 400 600 800 1000
t [sec.] t [sec.]

(a): m = /2, K =1 (b): m = 3/2, K =10

Figure 7 Comparison Between a Smith Predictor with Model Delay Automatic Determination (solid line)
and a Simple Smith Predictor (dashed line)

Therefore adaptive law has to be disabled when the process variable joins
t t t mo the steady state. In fact, after that, a load disturbance would be
y ( )d = ( )
o
+ T e T
+ T e T misunderstood as a change of the manipulated variable and so
m

t mo would provide a change in m. In order to avoid these behaviours,
mo t t
(
= mo + Te ) T
Te T
(17) the following formula (suggested in [Veronesi, Visioli,
- 2000])(8)(9) can be used:
m
o
t
= mo + T e T e T e T s
sign( K ) = sign Y ( s ) (19)
1 + sT
This is the proof that the proposed adaptation law In this manner, the time delay is quickly identified and
t
m (t ) = mo (y ( ) y m ( ) )d
1 therefore the proposed algorithm can improve the robustness of
0 the Smith Predictor in control processes affected by long time
m
o
t (18) delays. The effectiveness of the method is shown in Figure 7,


= + T e e e
o T T o T where some setpoint step changes are applied. It is easy to see that
m
m
the performance is dramatically better than the one achievable
brings m to for t faster the more they are different at the without model delay adaptation and that a higher value of K can
beginning. speed up the computation of m.
The algorithm works even if the loop is closed and the The proposed technique is also robust enough to
feedback allows the use of a coefficient K 1/ in order to accommodate some modelling errors, such as a wrong evaluation
accelerate its convergence. In this way the loop can be left in of the process dominant lag time (at least the supposed correct
Automatic Mode and the algorithm will autonomously identify estimation of process gain). In Figure 8 comparative simulation
the value of through a few simple setpoint changes. results are shown (referring to the case in which mo =2 and K
Some countermeasures have to be considered because the =10; analog results can be achieved if mo =/2).
sign of K must agree with that of the setpoint change, and the If the dominant lag time of the model is greater than that of

Performance Improvement of Smith Predictor through Automatic Computation of Dead Time 29


1.2 15
Tm=2T
1 14
(solid line)

estimated dead time (tau)


13
0.8
process variable (y)

Tm=T/2 12
0.6
(dotted line) Tm=T/2 (dotted line)
11
0.4
10
0.2
9
Tm=2T
0 8 (solid line)

-0.2 7
0 200 400 600 800 1000 0 200 400 600 800 1000
t [sec.] t [sec.]

Figure 8 Achievable Performances with a Modelling Error in the Dominant Lag Time Estimation
(Solid Line: Tm= 2T; Dotted Line: Tm= 0.5T)

the process (Tm>T), the transport dead time will be under- focused on algorithm tuning. In these proposed modifications, if
estimated (solid line, on the right side of Figure 8). This means the dead time of the model is wrong, the performance
that m will converge to a value lower than the real . On the dramatically decreases (become unstable). On the other hand, the
contrary, if Tm<T, then the dead time will be super-estimated proposed method in this paper can improve performance in
(dotted line, on the right side of Figure 8). accommodating a wrong value of the dead time of the model (m)
As seen in the left side of Figure 8, this is the best that the due to bad initial tuning or even to changes in the working
algorithm can do. However, the achievable performances are conditions in the process (i.e. a change of the flow rate in the
better than the standard Smith Predictor without any automatic pipelines).
time delay computation. For the purpose of presenting a clearly
understood figure, the two setpoints have been scaled by a factor
of 0.5. REFERENCES
(1) K. J. Astrom, Hang Lim, A new Smith Predictor for
CONCLUSIONS controlling a process with an integrator and long dead-time,
IEEE Trans. Autom. Contr., Vol. 39, pp. 343-345, Feb. 1994
In this paper the theory behind the control process affected by (2) T. Hagglund, An industrial dead-time compensating PI
dead time through the Smith Predictor has been explained. controller, Cont. Eng. Pract., Vol. 4, No. 6, pp. 749-756, 1996
Furthermore, considering the common FOPTD (First Order Plus (3) M. R. Matausek, A. D. Micic, A modified Smith Predictor
Time Delay) process, it has been shown how easy it is to for controlling a process with an integrator and long dead-
implement it with Yokogawa controller (YS170) and DCS time, IEEE Transaction on Automatic Control, Vol. 41, No.
(CENTUM CS1000/3000). 8, pp. 1199-1203, 1996
Since the dead time can change depending on the fluid speed (4) J. E. Normey-Rico, E. F. Camacho, Robust tuning of dead-
in the pipelines, a new law for its automatic computation has been time compensator for process with an integrator and long
proposed for supporting the operators in the fine tuning of the dead time, IEEE Transaction on Automatic Control, Vol.44,
algorithm. Thanks to the suggested method, the dead time can be No.8, pp-1597-1605, Aug.1999
quickly estimated through quite simple step changes in the (5) Z. Palmor, Stability properties of Smith dead time
manipulated variable (open loop approach) or even in the setpoint compensator controllers, International Journal of Control,
(closed loop approach). These step changes can be applied Vol. 32, No. 6, pp.937-949, 1980
manually by the operator when it is realized that the process (6) O. J. M. Smith, A controller to overcome dead time, ISA
variable behaviour is not satisfactory. Step changes in the setpoint Journal, Vol. 6, No. 2, pp. 28-33, 1959
can also be part of a program which has to be run automatically (7) F. G. Shinskey, PID deadtime control of distributed process
when the measured variable is too unstable. Preprints IFAC Workshop on Digital Control PID00,
The algorithm works better if a good model of the process is Terrassa (E), 2000
available, but it works well even if the main lag time is only (8) M. Veronesi, Regolazione PID. Fondamenti di teoria,
roughly estimated. Should the system under control be an integral algoritmi di taratura, applicazioni di controllo, Franco
process, additional Matausek-Micic feedback should also be Angeli, in Italian 2002
incorporated into the control strategy. (9) M. Veronesi, A. Visioli, Controllo di processi industriali
Recently some other modifications of the Smith Predictor affetti da ritardo, Atti del Convegno Automazione e processi
have been proposed (see bibliography). They are, however, not decisionali, ANIPLA, in Italian, 2000

30 Yokogawa Technical Report English Edition, No. 35 (2003)

Você também pode gostar