You are on page 1of 56

Closed loop time domain for Smith Controller using PI and time delay estimation

ABSTRACT
This study discusses the estimation of process parameters and time delay, in a Smith
predictor structure, using gradient algorithms in the time domain. A number of estimation
algorithms are outlined and applied in simulation to the estimation of the parameters of
an appropriate process model. An analytical exploration of the technique is also
provided. The problem Dead Time in control systems is an everlasting problem which is
of primary importance in process control as well.
The estimation and compensation of processes with time delays have been of interest to
academics and practitioners for several decades.The first proposed solutions for this
problem was the Smith predictor in 1957. It was based on the idea of removing the timedelay from the characteristic equation of the control closed loop, which seemed to be
very attractive at the first.Later investigations revealed that the method is very sensitive
to model mismatches, which results in destabilizing effects on the loop performance,
using work it was propose a new method for controller tuning using an optimization
method. The optimization method is based on dominating the gain of the minimum phase
term in the open loop transfer function of the loop, such that the non-minimum phase
effects of the model and process become dominated by the minimum phase characteristic
of the desired term. This idea was investigated by simulation on some selected examples
among the proposed modified versions of the Smith predictor.
Keywords: Estimation, time delay, Smith predictor, PI controller , Smith order

1. INTRODUCTION

217

Gradient methods of parameter estimation are based on updating the process model
parameter vector (which includes the time delay) by a vector that depends on information
about the cost function to be minimised; the cost function is normally a function that
depends on the square of the error between the process and model parameters. an
adaptive Smith predictor-based self-tuning PI controller and its application to the airconditioning system of a test room. The significant time delay of air-conditioning
processes can lead to degradation of performance and instability of the control loop. The
parameters of air-conditioning processes vary due to the changes in the operation
conditions. By using a recursive least squares (RLS) algorithm combined with a zdomain fitting method, the parameters of the air-conditioning process in the closed loop
including time delay can be estimated online. Based on the estimated dead-time, a Smith
predictor, which uses a reference model, is adopted to reduce the unfavorable effects of
the time delay in the air-conditioning system. Based on the predicted error and estimated
values, the control signal of the control loop is calculated by a self-tuning PI controller
using ITAE tuning rules. The performance, robustness and effectiveness of the proposed
control method are validated in the experimental platform. The corresponding
performance of the proposed control method is compared with an adaptive PI controller.
A number of such gradient algorithms have been defined (such as the Newton-Raphson
and Gauss-Newton algorithms); Ljung [1] outlines these algorithms in detail.
Applications of these algorithms to estimate the process model parameters in both open
loop and closed loop environments have appeared in the literature. Open-loop
applications, in both the time domain and frequency domain, have previously been dealt
with by ODwyer and Ringwood [2], [3], amongst others; this paper concentrates on the
application of the algorithms to estimate the model parameters in a Smith predictor
structure. Marshall [4] and Bahill [5] reduced the mismatch between the process time
delay and the model time delay, in such a structure, using a Gauss-Newton gradient
algorithm; just one of the modifications of this approach subsequently proposed is that
defined by Romagnoli et al. [6], who propose the use of a Newton-Raphson algorithm
for the application. This paper takes a more unified approach to the problem by
considering the estimation of the process parameters in a generalised model structure.
The first DTC structure, the Smith predictor, was presented to improve the performance
of classical controllers (PI or PID controllers) for plants with dead time. It is one of the
most popular dead-time compensating methods and most widely used algorithm for
dead-time compensation in industry.

218

Watannabe and Ito [1] proposed a modified Smith to eliminate this steady offset. Astrom
et al. [2] point out that the resulting set-point response is very slow, and the steady offset
cannot be eliminated if there is an estimating error in the process time delay. To
overcome these drawbacks, they proposed a modified Smith predictor. Zhang and Sun
[3] simplified the modified Smith predictor.

2. Literature Survey
In [20], Nilsson analyzes several important features of NCSs. He discusses three types of
delay models: xed, independently random, and a Markovian delay model. He also solves
the optimal stochastic control problem for both random delay models. Nilsson's work
standardized a few basic assumptions, which are also used throughout this work. First,

219

sensors are always assumed to be time-driven, that is, the plant output is sampled
periodically. Second, actuators are event-driven, and therefore apply control signals as
soon as they are received. The actuator also holds the last received control signal until a
new one is received. Finally, the controller is also event-driven, meaning that the control
signal is calculated as soon as a sensor value is received.
Process reaction curve tuning rules are based on calculating the controller parameters
from the model parameters determined from the open loop process step response. This
method was originally suggested by Ziegler and Nichols [31], who modelled the single
input, single output (SISO) process by a first order lag plus delay (FOLPD) model,
estimated the model parameters using a tangent and point method and defined tuning
parameters for the P, PI and PID controllers. Other process reaction curve tuning rules of
this type are also described, sometimes in graphical form, to control processes modelled
by a FOLPD model [16, 32-43] and an integral plus delay (IPD) model [16, 31, 33, 44,
45]. The advantages of such tuning strategies are that only a single experimental test is
necessary, a trial and error procedure is not required and the controller settings are easily
calculated; however, it is difficult to calculate an accurate and parsimonious process
model and load changes may occur during the test which may distort the test results
[20]. These methods may also be used to tune cascade compensators [46], discrete time
compensators [1, 47] and compensators for delayed multi-input, multi-output (MIMO)
processes [48].
Performance (or optimisation) criteria, such as the minimisation of the integral of
absolute error in a closed loop environment, may be used to determine a unique set of
controller parameter values. Tuning rules have been described, sometimes in graphical
form, to optimise the regulator response of a compensated SISO process, modelled in
stable FOLPD form [32, 36, 40, 49-57], unstable FOLPD form [53, 58], IPD form [32,
54, 59-61], stable second order system plus delay (SOSPD) form [54, 57, 59, 62-69] and
unstable SOSPD form [48, 60, 70]. Similarly, tuning rules have been proposed to
optimise the servo response of a compensated process, modelled in stable FOLPD form
[40, 51, 52, 56, 57, 71-74], unstable FOLPD form [58], stable SOSPD form [57, 67-69,
71] and unstable SOSPD form [58]. Tuning rules to achieve specified servo and
regulator responses simultaneously are also described [75-77a]. Cascade controllers [71,
78, 79] and discrete time compensators [1, 80-83] may also be tuned.

220

Ultimate cycle tuning rules are calculated from the controller gain and oscillation period
recorded at the ultimate frequency (i.e. the frequency at which marginal stability of the
closed loop control system occurs). The first such tuning methods was defined by Ziegler
and Nichols [31] for the tuning of P, PI and PID controller parameters of a process that
may or may not include a delay. The tuning rules implicitly build an adequate frequency
domain stability margin into the compensated system [84].
Zhang introduces a stability region for NCSs in [29] which describes the stability of a
NCS subject to loop delay and discretization eects. This stability region is in h- space,
where h is the xed sampling period and is the constant loop delay.
Analytical bounds are derived for a simple plant and controller, and Hartman [15]
proposes an algorithm to numerically approximate the stability region for any linear
system. The results from these works are discussed in greater detail . Xiao et al. [27]
introduce a method for modeling an NCS with bounded time- varying delay as a
Markovian discrete-time jump-linear system. This model is particularly attractive due to
its analytical nature and well-known stability results. For systems with random delays,
the problem has a special structure, and can be formulated as an output feedback
problem, and an optimization algorithm using LMI techniques is proposed.
Pohjola specically investigates the design of PID controllers for NCSs in [23].
He demonstrates the ineectiveness of the traditional Ziegler-Nichols tuning method
(see [3]) in NCSs, and uses an optimization method (previously developed by Reijonen
in [24]) to nd gains showing superior performance. He explores the changes in the
optimal gains with the time constant of a rst-order plant and the sampling time. When
presenting the optimal costs for dierent sampling times, he curiously nds the cost is
not a smooth, monotonically increasing function of the sampling time, but rather actually
has local maximums around particular sampling times; see Figure 1.2.
Pohjola uses the integral time-weighted absolute error (ITAE) cost metric, but similar
behavior can be found with many other metrics, such as integral absolute error (IAE),
rise time, and settling time. Reproducing his results, we nd the exact same behavior, but
determining the cause indicates the results are misleading. From Pohjola's results,
it appears that there are local optimum sampling times, and therefore, in some cases,
a slightly longer sampling period may improve performance. However, this apparent
behavior is actually due to sampling times which are not integer divisors of the step

221

length in the reference signal. When the sampling time, h is not an integer divisor
of the time between steps in the reference signal, the step change occurs between
sampling periods, causing signicant increases in the cost function. Figure 1.2 also
shows the smooth increase in cost as a function of h along integer divisors of the
step length, which in this case is 10 seconds. For example, if the sampling period is
1 second (h = 1), then the controller calculates a new control signal as soon as the
reference signal changes at t = 10. When h = 0:9, the controller samples at t = 9:9
and t = 10:8, so the change in the reference signal is not acted upon until t = 10:8,
while the cost for the system increases from t = 10 to t = 10:8.
Delay feature is a widespread phenomenon in the industrial production process, due to
the existence of time delay phenomenon, the disturbance can not be timely detection,
control action it will take time to reflect after the system output, and therefore is not easy
to select the controller parameters, if the control parameters improper adjustment will
cause the system to control quality decline will lead to serious system instability.
Especially for complex industrial systems with time-varying characteristics, but also
increase the difficulty of the design of the control system. This article describes the
history and status quo of the time delay process research and analysis of a variety of
control methods for time delay process. Delay system control is still one of the hot spots
of the current academic and engineering research, but the time delay process of
intelligent control technology is still in the initial stage, the intelligent control of the
research process with time delay method has very important theoretical and practical
significance. An intelligent control method for industrial processes with delay
characteristics that conventional PD-type fuzzy controller based on an integral link in
parallel, and the introduction of two weight coefficients and constitute a twodimensional PID fuzzy controller, improved controller is essentially belong to the nonlinear controller and fuzzy control rules are easy to set up, more convenient. Integral part
of the rights to improve the self-adaptability and robustness of the control system, the
paper weight coefficient the blur correction algorithm to adjust controller proportion
and integral part; smart weighted adjustment of fuzzy control rules, take advantage of
the error and the error the absolute value of the change as their own weighted construct
error and error weight function, indirectly changing the fuzzy control rules. The
simulation results show that the effect of improved control of fuzzy control method,
superior to ordinary fuzzy control method to improve the control performance of the
system. Fuzzy controller can overcome model mismatch adverse impact, but when large

222

time-delay system model error increases, the control effect declined, so this article will
improve the fuzzy controller and Smith predictor combined. The introduction of the first
order inertia link in the main part of the Smith Predictor feedback channel, the simulation
results analysis and research by the magnification of the accused, the time constant and
time delay constant change, different circumstances inertia link parameters setting rules,
these rules to achieve a real-time adaptive adjustment inertia link parameters institutions.
Intelligent control method of the controller part and the predictor parts to overcome
model parameters do not match the requirements of the control system of the plant
model accuracy can be further reduced, the robustness of the system have been
significantly improved and Immunity . Combining MATLAB simulation, the analysis
compare several control methods in system parameters change control results prove that
the control method proposed in this paper to obtain better control effect, with a certain
time delay process control applications prospects.

3. METHODOLOGY
Development of the gradient algorithms
Marshall [4] and Bahill [5] have developed a parameter identification algorithm
to estimate the corresponding model parameters and time delay of a first order lag plus
time delay (FOLPD) process, in a Smith predictor structure. In the development of the
algorithm, the authors assume that the plant output is linearly related to any changes in
the plant parameters i.e.
y p ( t , ) y p ( t , ) e( t , )

(1)

with y p ( t , ) process output after a change in parameter , y p ( t , )


starting value of process output = model output y m ( t ) . e( t , ) may be estimated
in a number of different ways; two such methods are as follows:

223

e( t , )

y p

(2)

y p y m

e( t , ) 0.5

(3)

One of the advantages of relay oscillation tuning is that it is applicable to both selfregulating and integrating processes. Having determined the apparent deadtime, an
integrating process model has already been identified since the maximum slope of the
process output during initialization is known. This slope is the gain for an integrating
process. Regardless of whether the process is integrating or self-regulating, the autotuner will save the integrating gain value along with the apparent deadtime.
Knowing the deadtime, ultimate gain, and ultimate period it is possible to calculate a
first-order plus deadtime process model as detailed in [11]. The following equations are
derived from the first-order process model transformed into the frequency domain in the
exponential form:

Tc

Tu
2Td
tan(
)
2
Tu

4 2 Tc 2
1
Ks
1
Ku
Tu 2

(1)
( 2)

Where
Tc = process time constant
Tu = ultimate period
Td = process apparent deadtime
Ks = process static gain
Ku = ultimate gain
The process time constant in equation (1) is expressed by a tangent function which gives
a good approximation when the deadtime is relatively long in relation to the time
constant. For processes with insignificant deadtime a large error results in the time
constant computation, even for a small error in deadtime identification. A heuristic

224

approach to replace equation (1) has been developed [11] and implemented in a DCS [8].
It is based on knowing the ratio of ultimate period and deadtime, which is approximately
equal to two for deadtime dominant processes and close to four for processes that are
lag dominant. Using this approach allows the time constant and static gain to be
identified within an accuracy of 10-20 percent without having to modify the relay
oscillation tuning procedure.
The accuracy of model identification for a self-regulating process may be improved
somewhat by identifying the process static gain through a closed loop step test.
Following relay oscillation a small setpoint change may be made with the controller in
automatic mode. The static gain is calculated as the ratio of percent change in setpoint
and percent change in controller output between steady states. Knowing the static gain,
ultimate gain, and ultimate period, the process deadtime and time constant may be
calculated from the following equations [11], [12]:
Tu
( Ks Ku )2 1
2
T
2Tc
Td u ( tan 1
)
2
Tu
Tc

(3)
(4)

Table 1 demonstrates the accuracy of using equations (3) and (4). The ultimate gain and
ultimate period were determined for several first-order plus deadtime process models
using relay oscillation. The time constant and deadtime were calculated using equations
(3) and (4) and the actual static gain. The difference between actual and calculated time
constant and deadtime averaged less than five percent. If the static gain is identified with
a five percent error in accuracy, the calculated time constant would be in error by as
much as 10 percent.

225

Ks actual
Tc actual
Td actual
Ku
Tu
Tc calc
1.0
100
12
13.67
48.0
104.2
1.0
25
3
13.64
12.0
26.0
1.0
50
12
7.51
44.0
52.1
1.0
12.5
3
7.36
11.2
13.0
1.0
66.67
12
9.5
46.0
69.2
1.0
16.67
3
9.77
11.2
17.3
1.0
200
12
26.02
50.0
207.0
1.0
50
3
27.06
12.0
51.7
1.0
15
2
12.32
8.0
15.64
2.0
15
2
6.15
8.0
15.61
0.5
15
2
24.68
8.0
15.67
Table 1. Comparison of actual and calculated process model from static gain, ultimate
gain and period
Upon completion of active tuning, the auto-tuner has identified the ultimate gain,
ultimate period, deadtime, time constant, static gain and integrating gain for the process.
The user may input the type of process, self-regulating or integrating, the type of tuning
rules to use, and perhaps an additional tuning factor such as the closed loop time
constant. The tuning rules are then applied and the initial settings are written to the
controller.
Marshall [4] and Bahill [5] use equation (2) in their development of the identification
method for updating the gain, time constant and time delay of a FOLPD process model.
The authors develop a Gauss-Newton gradient method based on approximating the
Hessian matrix as a function of y p . This development is provided in detail by
ODwyer [7].
Alternative gradient algorithms may also be defined by using equation (3) in the
development, for example (as it is a straightforward matter to analytically calculate
y m ). In addition, the Hessian matrix may be approximated as a function of

appropriate second partial derivative as well as first partial derivative terms, giving a
Newton-Raphson gradient algorithm. Five alternative algorithms are so defined by the
authors. Following the example of Marshall [4], all six algorithms may be represented in
block diagram form (ODwyer [7]).

226

Td calc
12.5
3.1
11.0
3.0
12.3
3.0
12.8
3.1
2.1
2.1
2.1

4. RESULTS
The algorithms defined have been simulated, for updating all of the parameters
separately, using the SIMULINK package. It was decided to simulate the algorithms for
seven process/model combinations, in a Smith predictor structure; the processes
considered include high order, underdamped and non-minimum phase processes, which
were modelled by equivalently ordered models or mismatched FOLPD and second order
system plus time delay models, as appropriate. The PI and PID primary controllers used
(in the Smith predictor) are specified to be robust to the possible process/model
parameter mismatches considered. Any lack of conformity between the model and
process control system can cause instability and the effects of non-compliance in terms of
time delay in stability of system is more than the effects of non-compliance in fractional
parts of model and process transfer function. Unlike smith opinion, complete lack of
conformity between the model and the process never happens, so to achieve a good
control structure we should always seek improved methods of smith or new methods of
planning controllers. In this case, we can improve the performance of
time delay smith predictor controller.
Using the property as the top destination without time delay when open-loop control
system transfer function of Smiths predictor , helps us to present a new method of

227

controller tuning parameters. New methods using this property could provide optimum
PI controller parameters. After the placement of designed controller in the Smiths
model, a new good performance of this method compared to other methods was
observed.
In each simulation, the excitation signal at the servo input is of band limited white noise
form; such a signal was determined to be sufficiently exciting so that appropriate
parameter updating is achieved. In all cases, the individual model parameters are updated
at discrete intervals using a dedicated s-function in SIMULINK; the gradient algorithm
implementations, which are in continuous time are also effectively set up in continuous
time in the SIMULINK environment (by choosing a small step size for the simulations).

These extended tuning rules, or simple tuning rules as they are called, also determine the
setpoint weighting factor for the two-degree-of-freedom PID controller. Loops tuned for
good load disturbance attenuation are generally underdamped for setpoint change
response and can benefit from setpoint weighting. Astrom and Hagglund developed the
extended tuning rules by tuning an ISA standard controller for a number of different
process models using the dominant pole design and relating the settings as a function of
ultimate gain, ultimate period and normalized process gain,

1
where
Ku K s

Ks is process static gain


Ku is ultimate gain

When normalized gain is known,

K Ti
T
,
, and d are defined as a function of
Ku Tu
Tu

228

PI Control:
K
fk ( ) 0.053 exp(2.9 2.6 2 ),
Ku
K
fk ( ) 0.13 exp(1.9 1.3 2 ),
Ku

if Ms 1.4

if Ms 2.0

Ti
fti ( ) 0.90 exp( 4.4 2.7 2 )
Tu
Ms is the design parameter - sensitivity

The design also provides the optimal value for the setpoint weighting factor
f ( ) 11
. exp( 0.0061 1.8 2 ), if Ms 1.4
f ( ) 0.48 exp(0.4 0.17 2 ), if Ms 2.0

PID Control:
K
fk ( ) 0.33 exp( 0.31 1.0 2 ),
Ku
K
fk ( ) 0.72 exp( 1.6 1.2 2 ),
Ku

if Ms 1.4
if Ms 2.0

Ti
fti ( ) 0.67 exp( 1.4 0.008 2 )
Tu
Td
ftd ( ) 0.16 exp(1.2 0.32 2 )
Tu

f ( ) 0.58 exp( 1.3 3.5 2 ), if Ms 1.4


f ( ) 0.25 exp(0.56 0.12 2 ), if Ms 2.0

Time delay estimation


Representative simulation results are provided in Cases 1 to 5.
Case 1: Model G m e s 2e 1.4 s (1 0.7s) , primary controller G c 1.75 1 1 0.7s .
m

In the figures, process time delay p = 1.2 seconds and non-delay process G p G m .
The Gauss-Newton (1) algorithm refers to the algorithm formulated by Marshall [4] and
Bahill [5]; the other algorithms have been formulated by the authors.
The approach became significantly more attractive after introducing relay oscillation
auto-tuning, as described in [4] and [5]. An example of the implementation of this
approach in a Distributed Control System (DCS) is given in [7] and [8]. The relay

229

oscillation tuning method identifies the ultimate gain and ultimate period, so that
controller settings may be determined from these parameters. Relay oscillation is an ondemand automatic tuning technique. Auto-tuning can be categorized as tuning ondemand or continuous adaptive tuning. On-demand tuning must be initiated by a human.
Continuous adaptive tuning is performed automatically following setpoint changes,
significant disturbances, or from low level injected excitation signals. Most loops need
only tuning on demand upon commissioning or perhaps scheduling of tuning parameters
to deal with process nonlinearities.
In recent years significant progress has been made with model based tuning, in particular
with Internal Model Control (IMC) and Lambda tuning [9], [10]. Both approaches result
in a first-order closed loop response to setpoint changes. A tuning parameter relating to
the speed of response is used to vary the tradeoff between performance and robustness.
Both methods adjust the PID controller reset (or reset and rate) to cancel the process
pole(s) and adjust the controller gain to achieve the desired closed loop response. IMC
and Lambda tuning have become popular because oscillation and overshoot are avoided
and control performance can be specified in an intuitive way through the closed loop
time constant.
One of the limitations of model based tuning is process model identification. An
equivalent first-order plus deadtime process model with parameters of static gain,
apparent deadtime, and apparent time constant is usually identified for self-regulating
processes. For integrating processes, model parameters of process gain and deadtime are
determined. Model identification is typically made by an open loop step test. Compared
to the relay oscillation method open loop methods are not easy to automate. With open
loop methods, human intervention is often required to assure an accurate model due to
nonlinearities in the process, valve hysteresis, and load disturbances. A different
technique is required for self-regulating and integrating processes.
The relay oscillation tuning method and an enhancement to it that identifies a selfregulating and an integrating process model in addition to ultimate gain and ultimate
period. This enhancement may be achieved without additional manipulation of the
process input. One automated procedure lets the user choose among many different
tuning rules. For example, modified Ziegler-Nichols rules might be chosen if the process

230

deadtime is small in comparison to time constant and fast setpoint tracking, and
disturbance rejection is required. On the other hand, IMC or Lambda tuning rules might
be used if the process deadtime is moderate compared to time constant or minimum
variance control is desired. For control of integrating processes, like liquid level control,
modified Ziegler-Nichols rules result in tight regulation, while Lambda tuning rules make
averaging control possible. When there is mild to moderate interaction between loops,
choosing the appropriate closed loop time constants with Lambda tuning can minimize
the impact of the interactions. Interacting loops may also be tuned by relay oscillation
[13], [14] but a sequential or iterative procedure is required. The enhanced relay
oscillation tuning method also offers the capability to auto-tune the two-degree-offreedom PID controller [15], the deadtime compensating PID controller (Smith
Predictor) and the SISO fuzzy logic controller described in [16], [17].

Relay

Tuning Rules
SP

Gp(s)
Gc(s)

Process

Controller

Figure 1. Relay Oscillation Principle

231

PV

Figure 1: Model time delay updating

Figure 2: Model time delay updating


p

= Gauss-Newton (1)
-- = Gauss-Newton (2)
.. = Gauss-Newton (3)

= Newton-Raphson (1)
-- = Newton-Raphson (2)
.. = Newton-Raphson (3)

Time (seconds)

Time (seconds)

The figures show that the algorithms facilitate a reduction in mismatch between
the process time delay and the model time delay.
Case 2: G m e s m 2 e s (1 4.5 4.5s2 ), G c 117
. (1 1 4.07 s 2.73s (1 0.5s)) .
Gp Gm .

Figure 3: Model time delay updating

= Gauss-Newton (1)

Figure 4: Model time delay updating

= Gauss-Newton (1)

Time (seconds)

Time (seconds)

Case

3:

G me s 2e s (1 18s 137s2 567s3 1403s4 2103s5 1846s6 856s7 158s8 ) ,


m

G c 2.14(1 1 9.75s 3.31s (1 0.61s)) . G p G m .

Figure 5: Model time delay updating

Figure 6: Model time delay updating

= Gauss-Newton (1)

Time (seconds)

= Gauss-Newton (1)

Time (seconds)

A similar comment to that made in Case 1 applies to the simulation results above.

232

Case 4: G me s 2e 1.4 s (1 0.7s) , G c 1.75 1 1 0.7s . In Figure 7, p = 1.2


m

seconds

G p 1.6 (1 0.5s) ;

and

in Figure

8,

1.6

seconds

and

G p 2.4 (1 0.9s) .

Figure 7: Model time delay updating

Figure 8: Model time delay updating


p

= Newton-Raphson (1)
-- = Newton-Raphson (2)
.. = Newton-Raphson (3)

= Newton-Raphson (1)
-- = Newton-Raphson (2)
.. = Newton-Raphson (3)

Time (seconds)

Time (seconds)

Figures 7 and 8 show that these algorithms facilitate a reduction in mismatch


between the process and the model. These are significant results, as the non-delay
process and model parameters are different.
Case 5: Model G me s 196
. e 1.84 s (1 6.7s) . The process corresponding to this
m

model is ( 2 4.5s) e s (1 8.5s 22.5s2 18s3 ) ; the model has been obtained from
the frequency domain identification technique outlined by ODwyer and Ringwood [3].
G c 6.84 1 1 6.7s . In Figure 9,

G p (1.2 31
. s) (1 5.9s 15.7s2 12.6s3 )

2
3
and p = 0.7 seconds; in Figure 10, G p (2.8 6.1s) (1 11s 29.3s 23.4s ) and

= 1.3 seconds.
Figure 9: Model time delay updating

Figure 10: Model time delay updating

= Gauss-Newton (1)

= Gauss-Newton (1)

Time (seconds)

Time (seconds)

Good fitting between the processes and their models is seen if the phase plots of
the processes and models are obtained at higher frequencies. This implies that the model
time delay estimates are appropriate, if it is desired to reduce the mismatch between the

233

process and the model, as the time delay will be the dominant influence on the phase plot
at higher frequencies. However, it is normally desirable when using a Smith predictor to
reduce the mismatch between the process and model time delays; the matching of the
process and the model at higher frequencies means that the difference between the
process and the model, fed back in the Smith predictor, is small at these frequencies. This
is not desirable, bearing in mind the large mismatch between the process and model time
delays. Thus, the gradient algorithms may not be suited for updating the time delay in a
Smith predictor structure, if the process and model orders are different.
Overall, the full panorama of simulation results (ODwyer [8]) show that when
the order of the process equals that of the model, the mismatch between the model time
delay and the process time delay is significantly reduced, irrespective of the match
between the process and model parameters. When the order of the model differs from
that of the process, then the model delay is updated to a final value. The performance of
the six algorithms is more difficult to compare, though it is obvious that there is little to
be gained (comparing Figures 1 and 2) in using a Newton-Raphson algorithm instead of
a Gauss-Newton algorithm. On balance, taking the full panorama of simulation results
obtained (ODwyer [8]), the Gauss-Newton (1) time delay updating algorithm is the
most appropriate algorithm to use, with the Gauss-Newton (2) algorithm being the least
appropriate one to use. It is interesting that it takes a long time for the model time delay
to converge to the process time delay in most cases, even when the order of the process
and model are the same. The oscillatory convergence pattern is a factor in this
disappointingly slow convergence rate; an alteration in the learning rate of the gradient
algorithms would improve this situation.
3.2 Estimation of the non-delay parameters
The six algorithms for separately updating the gain and the time constant have
been simulated individually, for the process-model combination in which both the process
and model are in FOLPD form. Representative simulation results that show the updating
of the model gain and model time constant are shown in Figures 11 and 12; these results,
and other supplementary simulation results provided by ODwyer [8], show that
convergence of the model gain to the process gain occurs, for all of the gradient
algorithms, when the non-gain model parameters are equal to the corresponding process
parameters. However, if the non-gain model parameters differ from the corresponding

234

process parameters, the model gain does not converge to the process gain (unlike the
behaviour of the model time delay in corresponding circumstances). Similarly,
convergence of the model time constant to the process time constant occurs when the
non-time constant model parameters are equal to the corresponding process parameters
for all of the algorithms; however, if the non-time constant model parameters differ from
the corresponding process parameters, the model time constant does not converge to the
process

time

constant.

The

G me s 2e 1.4 s (1 0.7s) , G c
m

Tp

simulation

conditions

for

gain

updating

are

1.75 1 1 0.7s , p m , process time constant

= model time constant Tm and process gain K p = 1.6; the simulation conditions

for time constant updating are as above with p m , K p = model gain K m and Tp =
0.5 seconds.
Figure 11: Model gain updating

Figure 12: Model time constant updating

Kp

= Gauss-Newton (1)
-- = Gauss-Newton (2)
.. = Gauss-Newton (3)

= Gauss-Newton (1)

Tp

Time (seconds)

Time (seconds)

4. Analytical exploration of the algorithms used


An analytical exploration of the gradient techniques was performed in discrete
time, for a number of process and model structures. These calculations are done in
discrete time as integer values of the process time delay appear as appropriate power
terms on the numerator transfer function of the process and that a standard procedure
has been defined to calculate the mean squared error (MSE) surface, by Widrow and
Stearns [9], in the domain. The closed loop gradient algorithms are, of course, defined in
continuous time; the application of the analysis performed in the discrete time domain
will need to take this into account.
It is required to prove that the MSE between the process and the model output is

235

unimodal with respect to the relevant process parameters, and is minimised when the
appropriate model parameter equals the equivalent process parameter.
4.1 Non-delay model parameter estimation
Theorem 1: For a first order discrete stable system, the MSE performance surface is
minimised when the model gain equals the process gain and the model time constant
equals the process time constant if (a) the model time delay index equals the process time
delay index (b) measurement noise is assumed uncorrelated with the process input and
output and (c) the input to the process and the model is assumed to be a white noise
input. The model time delay index is the model time delay divided by the sample time.
Proof: The process difference equation is
y(n) e

Ts Tp

y(n 1) K p (1 e

Ts Tp

)u(n g p 1) w ( n)

(4)

with p g p Ts , Ts = sample period, g p process time delay index and w(n) =


measurement noise. The model difference equation is (assuming the previous process
output is used in its calculation)

y m ( n) e T

Tm

y( n 1) K m (1 e T

Tm

) u( n g m 1)

(5)

with g m = model time delay index. The procedure defined by Widrow and Stearns [9]
may be used to calculate the MSE performance surface as follows:

E[ e 2 ( n)] ryy ( 0) rww ( 0)

1
dz
[ G m ( z 1 ) uu ( z) G m ( z) 2 yu ( z) G m ( z)]

2 j
z

with e( n) y( n) y m ( n) , uu ( z)

ruu ( n) z

, yu ( z)

ruu ( n) and rww ( n) are the autocorrelation functions of

(6)

ryu ( n) z n ,

ryy ( n),

y( n), u( n)

and w ( n)

respectively; ryu ( n) is the cross-correlation of y( n) and u(n). The model G m ( z)


corresponds to the output y m ( n) .
Using the residue theorem to calculate the closed curve integral, the MSE
function is calculated (from equation (6)) to be (ODwyer [7]):

236

K p (1 e
2

E[e ( n)]
2

(1 e

Ts Tp

2 Ts Tp

)2

Ts Tp

2
K m (1 e T T ) 2 2 K p K m (1 e

T
(1 e 2 T T )
(1 e
s

Tp

)(1 e T

Ts Tm

Tm

Ts ( g p g m ) Tm

rww ( 0) (7)

The MSE function is minimised when E[ e 2 ( n)] K m and E[e 2 ( n)] (1 / Tm )


equal zero simultaneously. The required calculations, determined by partially
differentiating equation (7) (ODwyer [7]), show that Tm Tp and K m K p (assuming
g p g m ).

A corollary to this theorem is that if the process time delay index, g p , is not
equal to the model time delay index, g m , then the MSE function is not minimised when
Km Kp

and Tm Tp . A further corollary to this theorem is that the MSE function is

not minimised when K m K p unless g m g p and Tm Tp , and the MSE function is


not minimised when Tm Tp unless g m g p and K m K p . In a closed loop
environment, the excitation signal to the process is not of white noise form; nevertheless,
it is interesting that the simulation results in Section 3.2 show that the conclusions
indicated do apply to the closed loop identification case, provided the process input is
sufficiently exciting. This is a less conservative criterion than that given in the theorem.
4.2 First order model time delay index estimation - non-delay parameters known
Elnagger et al. [10] prove that for a first order discrete stable system of known
gain and time constant, the MSE performance surface versus time delay is minimised
when the model time delay index equals the process time delay index, provided the
measurement noise is uncorrelated with the open loop process input. The resolution on
the process time delay is assumed to be equal to one sample period. The authors also
show that the MSE surface is unimodal with respect to the time delay, and that this
unimodality exists for any change in the process input (such a signal is consistent with
the types of signals present at the process input in closed loop applications). These
conclusions conform with the simulation results in Figures 1 and 2.

237

4.3 First order model time delay index estimation - non-delay parameters unknown
Elnagger et al. [11] show that for a first order discrete stable system of unknown
gain and time constant, the MSE performance surface versus time delay is minimised
when the model time delay index equals the process time delay index. The input signal to
the process is assumed to be white, though the authors state that this is a sufficient
condition, rather than a necessary condition. However, the authors do not explicitly show
that the MSE performance surface is unimodal with respect to the time delay, which is a
requirement for the use of a gradient algorithm for time delay estimation. It is therefore
appropriate to prove the following theorem.
Theorem 2: For a first order discrete stable system of unknown parameters, the unimodal
MSE performance surface versus time delay is minimised when the model time delay
index equals the process time delay index if (a) the measurement noise is uncorrelated
with the process input (b) the input to the process is assumed to be a white noise signal
and (c) the conditions provided in the theorem are observed on the model parameters.
Proof: The MSE performance surface, E[e 2 ( n)] , may be calculated to be (with e(n) =
process output minus the model output)

Ts Tp

eT

Tm

ryy (0) K p (1 e

2 e

2 K m (1 e T

Tm

Ts Tp

) K p (1 e

Ts Tp

eT

Ts Tp

) 2 K m (1 e T

Tm

uy

(g p ) 2 e

) ruu (g m g p ) (e

Tm

Ts Tp

Ts Tp

) 2 ruu (0) rww ( 0)


e T

eT

Tm

Tm

uy

(1)

) ruy (g m )

(8)
assuming that the measurement noise is uncorrelated with the process input. The proof
that the MSE function is unimodal with respect to the model delay, for g p g m and
gp gm ,

may be done by induction (ODwyer [7]); the full proof, together with the

conditions required on the model parameter values, are omitted due to pressure of space.

This theorem provides an analytical structure that helps to explain the simulation
results given in Figures 7 and 8 (Section 3.1); it is interesting that these simulation results
show that convergence of the model time delay to the process time delay is possible,

238

when K m K p and Tm Tp , even when the excitation signal to the process is not in
white noise form, or when the conditions on the parameter values in the theorem are
violated. This shows the conservative nature of the conclusions of the theorem.
IMC tuning rules for self-regulating processes use the three model parameters for a first
order plus deadtime model and a user-defined filter time constant to determine PID
controller settings. The filter time constant should be set to the desired closed loop time
constant. A larger value of filter time constant gives more damped tuning. Lambda tuning
rules use a parameter, , which is also the desired closed loop time constant for a selfregulating process. The closed loop time constant is usually chosen to be longer than the
open loop time constant, perhaps as much as three times longer. This is to ensure
robustness in the event of inaccuracy in model identification and changing process
conditions.

Process analysis tools have been used to assist in choosing the closed loop time constant
to achieve minimum variance control [10]. The closed loop time constant may be chosen
as a function of the corner period of the power spectrum of the process output in manual
control (corner period = 2 ). A proper closed loop time constant will attenuate slow
disturbances without amplifying noise in the process measurement. The following tuning
rules are given in [9] (IMC) and [10] (Lambda).

IMC Tuning Rules (self-regulating process)


PI Control:
K

Tc
K s ( f Tdt )

Ti Tc

where f is filter time constant

PID Control (ISA standard form):


K

Tc Tdt 2
Ks ( f Tdt 2)

Ti Tc Tdt 2
Td

Tc Tdt
2Tc Tdt

239

Lambda Tuning Rules (self-regulating process)


PI Control:
K

Tc Tdt 4
Ks

Ti Tc Tdt 4

defines the desired closed loop time constant.


PID Control:
There is no direct form of Lambda Tuning for the PID controller using a first order plus
deadtime process model.

Model based control of integrating processes enables the objective of averaging control
to be achieved. Rather than attempting to maintain tight control by aggressively moving
the manipulated variable, averaging control uses the tank, in the case of level control, to
absorb disturbances. By allowing level to swing within limits, variability in outlet flow is
reduced minimizing disturbances to downstream processes.
The IMC rule given below should be used for integrating processes when deadtime is
significant. The IMC and Lambda results are equivalent when there is no deadtime. For
integrating processes the tuning parameters, f and , are the desired time for the
disturbance effect to be arrested, i.e. the time the process output begins to recover
following a disturbance. Increasing the value f and relaxes control.

IMC Tuning Rule (integrating process)


PI control:
K

2 f Td
Ki ( f Td 2)2

Ti 2 f Td

y
- integrating process gain
ut
y - % change in the process output
Ki

u - % change in the process input


t - time interval over which y and u are calculated

Lambda Tuning Rule (integrating process)

240

PI control:
K

4
Ki Ti

Ti 2

Model based tuning using IMC or Lambda rules has some advantages over other tuning
rules.

Controllers are less sensitive to noise, valve life is prolonged, and process

variability may be minimized. However, the pole-zero cancellation approach results in


poor load disturbance performance when the process time constant is long. A technique
suggested to overcome this problem [9] is to apply the integrating process model in
place of the self-regulating model. Keep in mind that the relay oscillation auto-tuning
technique is capable of identifying both models for a self-regulating process. Using the
IMC rule for an integrating process may improve the performance of a self-regulating
process with a long time constant.
A technique has been suggested to obtain both minimum variance control and good load
response [10]. Controller settings may be scheduled as a function of deviation between
process output and setpoint. When the error is small, settings are derived from IMC or
Lambda tuning rules; if the error is larger, tuning rules such as the modified ZieglerNichols rules might be applied.
Model based tuning may be extended to the Smith Predictor deadtime compensating PID
controller. The first order plus deadtime process model provides the Smith Predictor
tuning parameters of process gain, time constant, and deadtime. The PI controller
settings may be determined using IMC or Lambda rules applying the gain and time
constant from the process model, with little or no deadtime.
The enhanced relay oscillation tuning method may also be used to auto-tune the SISO
fuzzy logic controller described in [16], [17]. The process parameters needed to tune the
scaling factors are the ultimate period, ultimate gain, apparent deadtime, and apparent
time constant. The change-in-error scaling factor is set as a function of the ratio of
deadtime to time constant. The change-in-output scaling factor is calculated from
ultimate gain and change-in-error scaling factor. The error scaling factor is calculated
from ultimate period, scan rate, and change-in-error scaling factor.

241

4.4 Time delay index estimation for a general model


An analytical framework on the convergence of the model time delay index, in a
general model structure, may also be put in place for the case where the non-delay
process and model parameters are identical. The conditions for convergence were first
calculated for a process and model in SOSPD form, as a prelude to calculating the
convergence conditions for a process and model of arbitrary order; the conditions for
convergence are wider when the process and model are in SOSPD form, compared to
when the process and model are of arbitrary order. The relevant theorems are quoted
below and are proven by ODwyer [7] in a manner similar to the proof of Theorem 2
above.
Theorem 3: For a second order discrete stable system of known non-delay parameters,
the unimodal MSE performance surface versus time delay is minimised when the model
time delay index equals the process time delay index if the measurement noise is
uncorrelated with the process input.
Theorem 4: For a general order discrete stable system of known non-delay parameters,
the unimodal MSE performance surface versus time delay is minimised when the model
time delay index equals the process time delay index if (a) the measurement noise is
uncorrelated with the process input and (b) the conditions provided in the theorem are
observed on the model parameters.
The conclusions reached in Theorem 3 conform with the simulation results given
in Figures 3 and 4 and the conclusions reached in Theorem 4 conform with the
simulation results given in Figures 5 and 6.
Overall, the conclusions of the theorems conform with the appropriate simulation
results quoted in Section 3. Indeed, the results of the theorems are more conservative
than many of the results achieved in simulation.
The process open-loop response is modeled as a first-order plus dead time with a 40.2
second time constant and 93.9 second time delay P =

From input "u" to output "y":


5.6

242

exp(-93.9*s) * ---------40.2 s + 1

Continuous-time transfer function.

Note that the delay is more than twice the time constant. This model is representative of
many chemical processes. Its step response is shown below.
step(P), grid on

PI Controller
Proportional-Integral (PI) control is a commonly used technique in Process Control. The
corresponding control architecture is shown below.

243

Compensator C is a PI controller in standard form with two tuning parameters:


proportional gain Kp and an integral time Ti. We use the PIDTUNE command to design
a PI controller with the open loop bandwidth at 0.006 rad/s
Cpi =

Kp * (1 + ---- * ---)
Ti

with Kp = 0.0501, Ti = 47.3

Continuous-time PI controller in standard form

To evaluate the performance of the PI controller, close the feedback loop and simulate
the responses to step changes in the reference signal ysp and output disturbance signal d.
Because of the delay in the feedback path, it is necessary to convert P or Cpi to the statespace representation using the SS command.

244

The closed-loop response has acceptable overshoot but is somewhat sluggish (it settles
in about 600 seconds). Increasing the proportional gain Kp speeds up the response but
also significantly increases overshoot and quickly leads to instability.

245

The performance of the PI controller is severely limited by the long dead time. This is
because the PI controller has no knowledge of the dead time and reacts too "impatiently"
when the actual output y does not match the desired setpoint ysp. Everyone has
experienced a similar phenomenon in showers where the water temperature takes a long
time to adjust. There, impatience typically leads to alternate scolding by burning hot and
freezing cold water. A better strategy consists of waiting for a change in temperature
setting to take effect before making further adjustments. And once we have learned what
knob setting delivers our favorite temperature, we can get the right temperature in just
the time it takes the shower to react. This "optimal" control strategy is the basic idea
behind the Smith Predictor scheme.

Smith Predictor

246

The Smith Predictor control structure is sketched below.

The Smith Predictor uses an internal model Gp to predict the delay-free response yp of
the process (e.g., what water temperature a given knob setting will deliver). It then
compares this prediction yp with the desired setpoint ysp to decide what adjustments are
needed (control u). To prevent drifting and reject external disturbances, the Smith
predictor also compares the actual process output with a prediction y1 that takes the
dead time into account. The gapdy=y-y1 is fed back through a filter F and contributes to
the overall error signal e. Note that dy amounts to the perceived temperature
mismatch after waiting long enough for the shower to react.
Deploying the Smith Predictor scheme requires

A model Gp of the process dynamics and an estimate tau of the process dead time

Adequate settings for the compensator and filter dynamics (C and F)


Based on the process model, we use:

For C, we re-design the PI controller with the overall plant seen by the PI controller,
which includes dynamics from P,Gp, F and dead time. With the help of the Smith
Predictor control structure we are able to increase the open-loop bandwidth to achieve
faster response and increase the phase margin to reduce the overshoot
1

247

Kp * (1 + ---- * ---)
Ti

with Kp = 0.574, Ti = 40.2

Continuous-time PI controller in standard form

Comparison of PI Controller vs. Smith Predictor


To compare the performance of the two designs, first derive the closed-loop transfer
function from ysp,d to y for the Smith Predictor architecture. To facilitate the task of
connecting all the blocks involved, name all their input and output channels and
let CONNECT do the wiring

248

The Smith Predictor provides much faster response with no overshoot. The difference is
also visible in the frequency domain by plotting the closed-loop Bode response
from ysp to y. Note the higher bandwidth for the Smith Predictor.

Robustness to Model Mismatch


In the previous analysis, the internal model

matched the process model P exactly. In practical situations, the internal model is only an
approximation of the true process dynamics, so it is important to understand how robust
the Smith Predictor is to uncertainty on the process dynamics and dead time.
Consider two perturbed plant models representative of the range of uncertainty on the
process parameters:

249

To analyze robustness, collect the nominal and perturbed models into an array of process
models, rebuild the closed-loop transfer functions for the PI and Smith Predictor designs,
and simulate the closed-loop responses:)

250

Both designs are sensitive to model mismatch, as confirmed by the closed-loop Bode
plots:
bode(T1(1,1),'b',Tpi(1,1),'r--')
grid on
legend('Smith Predictor 1','PI Controller')

251

Improving Robustness
To reduce the Smith Predictor's sensitivity to modeling errors, check the stability margins
for the inner and outer loops. The inner loop C has open-loop transfer C*Gp so the
stability margin are obtained .

252

The inner loop has comfortable gain and phase margins so focus on the outer loop next.
Use CONNECT to derive the open-loop transfer function L from ysp to dp with the
inner loop closed

253

This transfer function is essentially zero, which is to be expected when the process and
prediction models match exactly. To get insight into the stability margins for the outer
loop, we need to work with one of the perturbed process models, e.g., P1

254

This gain curve has a hump near 0.04 rad/s that lowers the gain margin and increases the
hump in the closed-loop step response. To fix this issue, pick a filter F that rolls off
earlier and more quickly
Verify that the gain margin has improved near the 0.04 rad/s phase crossing:

255

Finally, simulate the closed-loop responses with the modified filter

256

The modified design provides more consistent performance at the expense of a slightly
slower nominal response.
Improving Disturbance Rejection
Formulas for the closed-loop transfer function from d to y show that the optimal choice
for F is

where tau is the internal model's dead time. This choice achieves perfect disturbance
rejection regardless of the mismatch between P and Gp. Unfortunately, such "negative
delay" is not causal and cannot be implemented. In the paper:
Huang, H.-P., et al., "A Modified Smith Predictor with an Approximate
Inverse of Dead Time," AiChE Journal, 36 (1990), pp. 1025-1031
the authors suggest using the phase lead approximation:

where B is a low-pass filter with the same time constant as the internal model Gp. You
can test this scheme as follows:
C=

Kp * (1 + ---- * ---)
Ti

with Kp = 0.144, Ti = 40.1

Continuous-time PI controller in standard form

257

5. CONCLUSION

258

The work involves the estimation of model parameters (including time delay) using
gradient methods, in a Smith predictor structure. A reduction in the mismatch between
the (unknown) process and the model (particularly the time delay mismatch) facilitates an
improvement in the performance of the Smith predictor. The original contributions of this
work are as follows:
(a) the development of five gradient algorithms for the estimation of the model
parameters in a closed loop environment, following on from the work done in this area
by Marshall [4] and Bahill [5], amongst others (b) the estimation of the appropriate
parameters of a model in the Smith predictor structure, for a variety of processes using
the gradient algorithms and (c) an analytical exploration of the technique, which
demonstrates the appropriateness of using gradient algorithms for the identification
problem, in certain applications. Relay oscillation auto-tuning may be extended to
identify a first-order plus deadtime or integrating process model in addition to ultimate
gain and ultimate period. This capability offers a wider choice of tuning rules and the
potential for improved loop performance.
The ability to specify relative performance and robustness is an attractive feature of
model based tuning rules. The relay oscillation method is easier to automate than an
alternative open loop tuning method and may be less disruptive to the process.

6. REFERENCES
[1] L. Ljung, System identification: theory for the user, Prentice-Hall Inc., 1987.

259

[2] A. ODwyer and J.V. Ringwood, Model parameter and time delay estimation using
gradient methods, Irish DSP and Control Colloquium, Dublin City University, Dublin 9,
1994.
[3] A. ODwyer and J. V. Ringwood, Model parameter and time delay estimation in the
frequency domain, Irish DSP and Control Colloquium, Queens University, Belfast,
1995.
[4] J.E. Marshall, Control of time delay systems, IEE Control Engineering Series 10.
Peter Peregrinus Ltd., 1979.
[5] A.T. Bahill, A simple adaptive Smith-predictor for controlling time delay systems,
IEEE Control Systems Magazine, Vol. 3, No. 2, pp. 16-22, 1983.
[6] J.A. Romagnoli, M.N. Karim, O.E. Agamennoni and A. Desages, Controller designs
for model-plant parameter mismatch. IEE Proceedings, Part D, Vol. 135, pp. 157-164,
1988.
[7] A. ODwyer, The estimation and compensation of processes with time delays,
Ph.D. thesis, Dublin City University, Dublin 9, Ireland, 1996.
[8] A. ODwyer, Simulation results associated with the estimation of model parameters
(including time delay) in a Smith predictor structure, Technical Report EE/JVR/96/10,
Dublin City University, Dublin 9, Ireland, 1996.
[9] B. Widrow and S.D. Stearns, Adaptive Signal Processing, Prentice-Hall Inc., 1985.
[10] A. Elnagger, G.A. Dumont, G.A. and A.-L. Elshafei, System identification and
adaptive control based on a variable regression for systems having unknown delay,
Proceedings of the 29th IEEE Conference on Decision and Control, Vol. 3, pp. 14451450, Honolulu, Hawaii, USA, 1990.
[11] A. Elnagger, G.A. Dumont and A.-L. Elshafei, Delay estimation using variable
regression, Proceedings of the American Control Conference, pp. 2812-2817, Mass.,
USA, 1991.
[12] J. G. Ziegler, and N. B. Nichols, Optimum Settings for Automatic Controllers,
Transactions of the ASME, Vol. 64, Nov. 1942, pp. 759 - 768.
[12] J. G. Ziegler, and N. B. Nichols, Optimum Settings for Automatic Controllers,
Transactions of the ASME, Vol. 115, June 1993, pp. 220 - 222.
[13] W.L. Bialkowski and Brian Haggman, Quarter Amplitiude Damping Method Is No
Longer The Industry Standard, American Papermaker, March 1992
[14] K. J. Astrom, and T. Hagglund, Automatic tuning of PID controllers, ISA 1988,
Research Triangle Park, NC, USA.

260

[15] Astrom, K. J., and T. Hagglund, A frequency domain method for automatic tuning
of simple feedback loops, IEEE 23rd Conference on Decision and Control, Las Vegas,
Dec. 1984.
[16] Astrom, K. J., and T. Hagglund, Automatic tuning of simple regulators with
specifications on phase and amplitude margins, Automatica, 20, 1984, pp. 645-651.
[17] Gregory K. McMillan, Willy K. Wojsznis, and Ken Meyer, Easy Tuner for DCS,
ISA 1993, Chicago.
[18] Fisher-Rosemount Systems Inc., Installing and Using the Type ACS401 Intelligent
Tuner, November 1992.
[19] I-Lung Chien, and P. S. Fruehauf, Consider IMC Tuning to Improve Controller
Performance, Chemical Engineering Progress, October 1990.
[20] W. L. Bialkowski, Control Engineering Course Material, Entech Seminar 1991,
Toronto, Canada.
[21] W. K. Wojsznis, and T. L. Blevins, System and Method for Automatically Tuning a
Process Controller, US patent pending No. 08/070 090.
[22] Chang C. Hang, Tong H. Lee, and Weng K. Ho, Adaptive Control, ISA 1993.
[23] Shih-Haur Shen and Cheng-Ching Yu, Use of Relay-Feedback Test for Automatic
Tuning of Multivariable Systems, AIChE Journal, April 1994
[24] Vinod U. Vasnani, Towards Relay Feedback Auto-Tuning of Multi-Loop Systems,
Ph.D. Thesis, National University of Singapore, Singapore, 1994
[25] Astrom, K.J. and T. Hagglund, PID Controllers: Theory, Design, and Tuning, 2nd
Edition, ISA 1995
[26] S. Joe Qin, Auto-Tuned Fuzzy Logic Control, American Control Conference,
Baltimore, 1994
[27] Fisher-Rosemount Systems, Inc., Installing and Using Type ACS201 Intelligent
Fuzzy Logic Control, October 199
Appendix
Add-on products bring efficiency to these design tasks by enabling you to:

Configure your Simulink PID Controller block for PID algorithm (P,PI, or PID),
controller form (parallel or standard), anti-windup protection (on or off), and controller
output saturation (on or off)

261

Automatically tune controller gains and fine-tune your design interactively

Tune multiple controllers in batch mode

Run closed-loop system simulation by connecting your PID Controller block to


the plant model

Automatically generate C code for targeting a microcontroller

Automatically generate IEC 61131 structured text for targeting a PLC or PAC

Automatically scale controller gains to implement your controller on a processor


with fixed-point arithmetic

s = tf('s');
P = exp(-93.9*s) * 5.6/(40.2*s+1);
P.InputName = 'u';
P.OutputName = 'y';
P
step(P), grid on

% dead time with a 40.2 second time constant and 93.9 second time delay:
s = tf('s');
P = exp(-93.9*s) * 5.6/(40.2*s+1);
P.InputName = 'u'; P.OutputName = 'y';
P
%%
% Note that the delay is more than twice the time constant. This
% model is representative of many chemical processes. Its step
% response is shown below.
step(P), grid on

262

%% PI Controller
% Proportional-Integral (PI) control is a commonly used technique in
% Process Control. The corresponding control architecture is
% shown below.
%
% <<../Figures/smith_01.png>>
%
% Compensator C is a PI controller in standard form with two tuning
% parameters: proportional gain |Kp| and an integral time |Ti|. We use the
% |PIDTUNE| command to design a PI controller with the open loop bandwidth
% at 0.006 rad/s:
Cpi = pidtune(P,pidstd(1,1),0.006);
Cpi
%%
% To evaluate the performance of the PI controller, close the feedback loop
% and simulate the responses to step changes in the reference signal |ysp|
% and output disturbance signal |d|. Because of the delay in the feedback
% path, it is necessary to convert |P| or |Cpi| to the state-space
% representation using the |SS| command:
Tpi = feedback([P*Cpi,1],1,1,1); % closed-loop model [ysp;d]->y
Tpi.InputName = {'ysp' 'd'};
step(Tpi), grid on
%%
% The closed-loop response has acceptable overshoot but is somewhat
% sluggish (it settles in about 600 seconds). Increasing the proportional
% gain Kp speeds up the response but also significantly increases overshoot
% and quickly leads to instability:
Kp3 = [0.06;0.08;0.1];

% try three increasing values of Kp

Ti3 = repmat(Cpi.Ti,3,1); % Ti remains the same

263

C3 = pidstd(Kp3,Ti3);

% corresponding three PI controllers

T3 = feedback(P*C3,1);
T3.InputName = 'ysp';
step(T3)
title('Loss of stability when increasing Kp')
%%
% The performance of the PI controller is severely limited by the long dead
% time. This is because the PI controller has no knowledge of the dead time
% and reacts too "impatiently" when the actual output |y| does not match
% the desired setpoint |ysp|. Everyone has experienced a similar phenomenon
% in showers where the water temperature takes a long time to adjust.
% There, impatience typically leads to alternate scolding by burning hot
% and freezing cold water. A better strategy consists of waiting for a
% change in temperature setting to take effect before making further
% adjustments. And once we have learned what knob setting delivers our
% favorite temperature, we can get the right temperature in just the time
% it takes the shower to react. This "optimal" control strategy is the
% basic idea behind the Smith Predictor scheme.
%% Smith Predictor
% The Smith Predictor control structure is sketched below.
%
% <<../Figures/smith_02.png>>
%
% The Smith Predictor uses an internal model |Gp| to predict the delay-free
% response yp of the process (e.g., what water temperature a given knob
% setting will deliver). It then compares this prediction yp with the
% desired setpoint ysp to decide what adjustments are needed (control u).
% To prevent drifting and reject external disturbances, the Smith predictor
% also compares the actual process output with a prediction |y1| that takes
% the dead time into account. The gap |dy=y-y1| is fed back through a
% filter F and contributes to the overall error signal |e|. Note that |dy|

264

% amounts to the perceived temperature mismatch _after_ waiting long enough


% for the shower to react.
%%
% Deploying the Smith Predictor scheme requires
%
% * A model |Gp| of the process dynamics and an estimate |tau| of the
% process dead time
%
% * Adequate settings for the compensator and filter dynamics (|C| and |F|)
%
% Based on the process model, we use:
%
% $$G_p(s) = {5.6 \over 1 + 40.2 s } , \tau = 93.9 $$
%
% For |F|, use a first-order filter with a 20 second time constant to
% capture low-frequency disturbances.
F = 1/(20*s+1);
F.InputName = 'dy'; F.OutputName = 'dp';
%%
% For |C|, we re-design the PI controller with the overall plant seen by
% the PI controller, which includes dynamics from |P|, |Gp|, |F| and dead
% time. With the help of the Smith Predictor control structure we are able
% to increase the open-loop bandwidth to achieve faster response and
% increase the phase margin to reduce the overshoot.
% Process
P = exp(-93.9*s) * 5.6/(40.2*s+1);
P.InputName = 'u'; P.OutputName = 'y0';
% Prediction model
Gp = 5.6/(40.2*s+1);

265

Gp.InputName = 'u'; Gp.OutputName = 'yp';


Dp = exp(-93.9*s);
Dp.InputName = 'yp'; Dp.OutputName = 'y1';
% Overall plant
S1 = sumblk('ym = yp + dp');
S2 = sumblk('dy = y0 - y1');
Plant = connect(P,Gp,Dp,F,S1,S2,'u','ym');
% Design PI controller with 0.08 rad/s bandwidth and 90 degrees phase margin
Options = pidtuneOptions('PhaseMargin',90);
C = pidtune(Plant,pidstd(1,1),0.08,Options);
C.InputName = 'e'; C.OutputName = 'u';
C
%% Comparison of PI Controller vs. Smith Predictor
% To compare the performance of the two designs, first derive the
% closed-loop transfer function from |ysp,d| to |y| for the Smith Predictor
% architecture. To facilitate the task of connecting all the blocks
% involved, name all their input and output channels and let |CONNECT| do
% the wiring:
% Assemble closed-loop model from [y_sp,d] to y
Sum1 = sumblk('e = ysp - yp - dp');
Sum2 = sumblk('y = y0 + d');
Sum3 = sumblk('dy = y - y1');
T = connect(P,Gp,Dp,C,F,Sum1,Sum2,Sum3,{'ysp','d'},'y');
%%
% Use |STEP| to compare the Smith Predictor (blue) with the PI controller (red):
step(T,'b',Tpi,'r--')
grid on

266

legend('Smith Predictor','PI Controller')


%%
% The Smith Predictor provides much faster response with no overshoot.
% The difference is also visible in the frequency domain by plotting the
% closed-loop Bode response from |ysp| to |y|. Note the higher bandwidth
% for the Smith Predictor.
bode(T(1,1),'b',Tpi(1,1),'r--',{1e-3,1})
grid on
legend('Smith Predictor','PI Controller')
%% Robustness to Model Mismatch
% In the previous analysis, the internal model
%
% $$ G_p(s) e^{-\tau s} $$
%
% matched the process model |P| exactly. In practical situations, the
% internal model is only an approximation of the true process dynamics,
% so it is important to understand how robust the Smith Predictor is to
% uncertainty on the process dynamics and dead time.
%
% Consider two perturbed plant models representative
% of the range of uncertainty on the process parameters:
P1 = exp(-90*s) * 5/(38*s+1);
P2 = exp(-100*s) * 6/(42*s+1);
bode(P,P1,P2), grid on
title('Nominal and Perturbed Process Models')
%%
% To analyze robustness, collect the nominal and perturbed models
% into an array of process models, rebuild the closed-loop transfer

267

% functions for the PI and Smith Predictor designs, and simulate


% the closed-loop responses:
Plants = stack(1,P,P1,P2); % array of process models
T1 = connect(Plants,Gp,Dp,C,F,Sum1,Sum2,Sum3,{'ysp','d'},'y'); % Smith
Tpi = feedback([Plants*Cpi,1],1,1,1); % PI
step(T1,'b',Tpi,'r--')
grid on
legend('Smith Predictor 1','PI Controller')
%%
% Both designs are sensitive to model mismatch, as confirmed by the
% closed-loop Bode plots:
bode(T1(1,1),'b',Tpi(1,1),'r--')
grid on
legend('Smith Predictor 1','PI Controller')

%% Improving Robustness
% To reduce the Smith Predictor's sensitivity to modeling errors,
% check the stability margins for the
% inner and outer loops. The inner loop |C| has open-loop transfer
% |C*Gp| so the stability margin are obtained by
margin(C * Gp)
title('Stability Margins for the Inner Loop (C)')
%%
% The inner loop has comfortable gain and phase margins so focus on the
% outer loop next. Use |CONNECT| to derive the open-loop transfer function
% |L| from |ysp| to |dp| with the inner loop closed:

268

Sum1o = sumblk('e = ysp - yp'); % open the loop at dp


L = connect(P,Gp,Dp,C,F,Sum1o,Sum2,Sum3,{'ysp','d'},'dp');
bodemag(L(1,1))
%%
% This transfer function is essentially zero, which
% is to be expected when the process and prediction models match exactly.
% To get insight into the stability margins for the outer loop, we need to
% work with one of the perturbed process models, e.g., |P1|:
H = connect(Plants(:,:,2),Gp,Dp,C,Sum1o,Sum2,Sum3,{'ysp','d'},'dy');
H = H(1,1); % open-loop transfer ysp -> dy
L = F * H;
margin(L)
title('Stability Margins for the Outer Loop (F)')
grid on, set(gca,'xlim',[1e-2 1])
%%
% This gain curve has a hump near 0.04 rad/s that lowers the
% gain margin and increases the hump in the closed-loop step response.
% To fix this issue, pick a filter |F| that rolls off earlier and more
% quickly:
F = (1+10*s)/(1+100*s);
F.InputName = 'dy'; F.OutputName = 'dp';
%%
% Verify that the gain margin has improved near the 0.04 rad/s phase
% crossing:
L = F * H;
margin(L)

269

title('Stability Margins for the Outer Loop with Modified F')


grid on, set(gca,'xlim',[1e-2 1])
%%
% Finally, simulate the closed-loop responses with the modified filter:
T2 = connect(Plants,Gp,Dp,C,F,Sum1,Sum2,Sum3,{'ysp','d'},'y');
step(T2,'b',Tpi,'r--')
grid on
legend('Smith Predictor 2','PI Controller')
%%
% The modified design provides more consistent performance at the
% expense of a slightly slower nominal response.
%% Improving Disturbance Rejection
% Formulas for the closed-loop transfer function from |d| to |y|
% show that the optimal choice for |F| is
%
% $$ F(s) = e^{\tau s} $$
%
% where |tau| is the internal model's dead time. This choice achieves
% perfect disturbance rejection regardless of the mismatch between
% |P| and |Gp|. Unfortunately, such "negative delay" is not causal and
% cannot be implemented. In the paper:
%
%

Huang, H.-P., et al., "A Modified Smith Predictor with an Approximate

Inverse of Dead Time," AiChE Journal, 36 (1990), pp. 1025-1031

%
% the authors suggest using the phase lead approximation:
%
% $$ e^{\tau s} \approx { 1 + B(s) \over 1 + B(s) e^{-\tau s} }$$
%

270

% where |B| is a low-pass filter with the same time constant as


% the internal model |Gp|. You can test this scheme as follows:
%%
% Define B(s) and F(s)
B = 0.05/(40*s+1);
tau = totaldelay(Dp);
F = (1+B)/(1+B*exp(-tau*s));
F.InputName = 'dy'; F.OutputName = 'dp';
%%
% Re-design PI controller with reduced bandwidth
Plant = connect(P,Gp,Dp,F,S1,S2,'u','ym');
C = pidtune(Plant,pidstd(1,1),0.02,pidtuneOptions('PhaseMargin',90));
C.InputName = 'e'; C.OutputName = 'u';
C
%%
% Computed closed-loop model T3
T3 = connect(Plants,Gp,Dp,C,F,Sum1,Sum2,Sum3,{'ysp','d'},'y');
%%
% Compare T3 with T2 and Tpi
step(T2,'b',T3,'g',Tpi,'r--')
grid on
legend('Smith Predictor 2','Smith Predictor 3','PI Controller')
%%
% This comparison shows that our last design speeds up disturbance
% rejection at the expense of slower setpoint tracking.
displayEndOfDemoMessage(mfilename)

271

272

You might also like