Myslide - Es Towards Plug and Control Self Tuning Temperature Controller For PLC
Myslide - Es Towards Plug and Control Self Tuning Temperature Controller For PLC
Bernd-Markus Pfei!er*R
Siemens AG, Automation & Drives, Advanced Group Technologies A&D GT 5, D-76181 Karlsruhe, Germany
SUMMARY
Software PID controllers have become a standard component of automation with PLCs (programmable
logic controllers) and work together with classical sequential function charts in the same processing units.
However, traditional methods for the computer-aided design of control systems often involve high math-
ematical e!ort and are usually implemented on additional PCs that are only connected for commissioning
purposes. Therefore a new, very simple concept for self-tuning PID controllers will be presented, which is
implemented together with the controller on the PLC and which enables automatic tuning without prior
knowledge of the process. The concept is designed speci"cally for temperature control, but can also be used
for other control loops in the process industry which show stable time-lag dynamics and allow su$cient
setpoint steps. For users, the most important advantage is the drastic reduction of commissioning time and
e!ort. If, for example, there are 10 temperature loops in one machine, the successive tuning of all 10
controllers used to require several days. With the new concept, there is no longer any need for dedicated
tuning. The self-tuning of all control loops is performed automatically and simultaneously on machine
startup. Control performance is better than it is with the traditionally designed PID controllers, particularly
for slow temperature processes. The concept is based on a systematic startup sequence to explore process
dynamics, a modi"ed in#ection point method for process identi"cation and a separation of setpoint and
disturbance control. Copyright 2000 John Wiley & Sons, Ltd.
KEY WORDS: adaptive control; software PID control; programmable logic controller (PLC); temperature
control
1. INTRODUCTION
Customer demands for modern digital control systems meanwhile include the need for self-tuning
controllers, that automatically adapt to any temperature process without manual parametriz-
ation and without prior knowledge of process dynamics. Such a controller is supposed to learn
enough about an unknown process during the "rst heating phase and to be able to reach even the
* Correspondence to: Bernd-Markus Pfei!er, Siemens AG, Automation & Drives, Advanced Group Technologies A&D
GT 5, D-76181 Karlsruhe, Germany
R E-mail: [email protected]
"rst given setpoint without an overshoot (&plug & control'). This paper describes a new concept to
reach this goal with very low computational e!ort and memory requirements.
The concept can be classi"ed roughly as a model identi"cation adaptive controllers as e.g.
described by Isermann et al. [1, p.11]. Such a system consists of three main parts: process
identi"cation algorithm, controller design algorithm and the controller itself. For process identi-
"cation, parametric discrete-time ARMAX-models and recursive least-squares estimation could
be used. The controller itself could be a standard PID type designed by pole cancellation,
deadbeat or minimum variance considerations. Although this theory is well known since about
1980, it was not yet accepted for a widespread use in industry. Reasons may be robustness issues,
sensitivity to measurement noise, model structure mismatch and other disturbances. Anyway
high e!orts are required for a so-called supervision and co-ordination level, that decides if the
process is su$ciently excited for identi"cation and if estimated models are valid. An industry-
proved implementation of such a fully adaptive controller with discrete square- root "ltering
identi"cation (DSFI [2]) of a third-order ARMAX-model is delivered as a function block for
Simatic S7 by i.p.a.s.-systems, Frankfurt. On the other hand, the lean concept presented here
requires less than 10 per cent of the memory space and is a simpli"cation of these ideas with
respect to:
1. Adaptation mode: in most applications it is neither necessary nor even desired to adapt the
controller online permanently during normal operation. In contrast, only a self-tuning at
commissioning time, and possibly some adaptation on demand during online operation is
needed.
2. Neither the process model, nor the controller is explicitly calculated in time-discrete form.
Customers are used to quasi time-continuous controller implementations and like to
compare estimated model parameters like time-lags with their own experience, whereas they
mostly do not understand the properties of discrete-time models.
3. The process models are restricted to low-order transfer functions suitable for temperature
processes.
Some years ago, even expert systems have been proposed (e.g. by Arzen [5]) for auto-tuning of
controllers. Other suppliers of compact digital controllers e.g. Foxboro, Eurotherm and Philips
are also working on self-tuning schemes, but they usually do not publish their algorithms.
This paper is organized as follows: Section 1 summarizes some basic aspects of modelling and
control of temperature processes. Section 2 gives details on the identi"cation algorithm,
Section 3 on the controller design. In Section 4 some practical aspects of implementation and
industrial application are discussed.
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=Venkatachala=BG
subsystem i#1. External e.g. electrical energy is an additional input to the subsystem &heating'.
Any measurable temperature of a subsystem can be de"ned as the process output. It is usually
di$cult to determine all the heat transfer coe$cients from construction data, therefore experi-
mental parameter identi"cation is needed.
overshoots for setpoint step changes due to a closed loop transfer zero, even if closed loop
damping is su$cient and the response to load disturbances is satisfactory. Therefore, the most
important decision even for a simple control concept is a separation of setpoint and load
disturbance design. The PID is optimized for tight disturbance control and is enhanced with
a special structure decomposition to avoid overshooting setpoint responses: proportional and
derivative terms are placed in the feedback path.
2. IDENTIFICATION
Control design is supposed to rely on a rather simple process identi"cation algorithm that easily
"ts into a PLC function block. But the identi"cation must at least deliver a second order model
with two di!erent time constants, because they di!er by an order of magnitude for most
temperature processes. Many identi"cation algorithms for such measurement data deliver only
"rst-order models, that are not su$cient to design good PID control. Therefore, a modi"ed
in#ection point method is applied in a systematic startup sequence (Figure 2) to obtain informa-
tion of the process and successively improve the mathematical model.
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=Venkatachala=BG
Figure 2. Self-tuning of controller for unknown process * setpoint SP, process value PV, loop manipulated
variable LMN; constant heating LHLM}TUN for identi"cation and control; bit TUN}ON for activation of
self-tuning (source: Siemens user manual).
dx
t ,x ,
dt
x !x
t "t !t !t , t "
dx /dt
is calculated, assuming the steady state x "c . For the behaviour observed up to now, an
integrating process model with "rst-order time lag (IT )
K dxw/dt
G(s)" G , K" , ¹ "tu
s(¹ s#1) G ymax!y
can be assumed, for which PI-control according to the symmetric optimum [1, p. 263] with
integrating time constant ¹ "4¹ and gain
G
¹
K" G
8¹K
G
is designed. It is slightly detuned to avoid overshoots.
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=VVC=BG
Phase 3: &Rough' PI-control to reach the setpoint. The estimated IT -model does not have
a steady state, i.e. the process gain is still unknown. Due to the lack of information on process
dynamics, the PI control must be tuned quite conservative. But as soon as this rough control has
achieved a steady state, the process gain
x !x
K"
y !y
can be calculated.
x #K(y !y )!x
t "t #t , t "
U
dx /dt
In this formula, x #K(y !y ) is the virtual steady state at the end of the step response. The
classical in#ection point method for a complete step response delivers only P¹ !¹ ("rst-order
R
plus dead time) models. If the real process does not have a physical dead time, the approximation
by a non-minimum-phase model will result in quite conservative controllers. Therefore a second-
order Laplace transfer function model of the form
K
G(s)" , ¹ '¹
(¹ s#1)(¹ s#1)
¹
f"
¹
of the two time constants. The in#ection point of the step response of such a model is known in
analytic form
ln f
t "f ¹
f!1
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=Venkatachala=BG
The intersection of the in#ection tangent with the lines x"x and x "x #Ky yields time
lag t and recovery time t :
¹ 22\2
t "¹
¹
¹¹ ¹
t " ln !t #¹ #¹
¹ !¹ ¹
Introducing f , the following non-linear equation system is obtained:
t 1
¹ "t f\DD\, "
t f\DD\(1#f#( f ln f )/( f!1))!1
To solve this non-linear system for ¹ and f, the exponential functions must be replaced with
linear approximations for the relevant parameter space 2(f(20:
1
¹ +t , p "1.0722, p "2.0982
p f#p
t
+p f#p , p "1.1919, p "8.0633)
t
The second of these equations is solved for f:
1 t
f" !p
p t
then the "rst equation delivers ¹ , and "nally ¹ "f ¹ . This model form is only valid if
t /t '9.64. Otherwise a P¹n-model of the form
K
G(s)" , n'2
(¹ s#1)L
is assumed. There are tables in literature (e.g. Reference [4]) to "nd time-lag and recovery time of
this type of models. The table entries are now approximated by hyberbols to obtain the inverse
functions. Given t and t , the system order can be estimated to be
7.9826
n" #1.1099
(t /t )!0.3954
and the time constant to be
t
¹"
0.0165n#0.5078n#0.8387
This approach is feasible from a practical point of view up to the order of n)4.
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=VVC=BG
Figure 3. Heating and cooling identi"cation for split range control, heating and cooling
in#ection tangents are marked as arrows.
K (dx /dt)#K y
r " G , K " G
K G y
G
It must be noted here, that the cooling descent ratio is not only due to the active cooling, but also
to the simultanous shutdown of the heating.
3. CONTROL CONCEPT
The control concept is based on classical PID control, but allows a separation of setpoint and
load disturbance design: the PID is optimized for tight disturbance control and is enhanced with
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=Venkatachala=BG
1 ¹s
G (s)"K 1# # , v"5
0 ¹ s (1/v)¹ s#1
G
is considered and then decomposed. The whole con"guration in Figure 4 can be considered as
a cascade control: in an inner loop, the slow-temperature dynamics are accelerated by PD
control; in the outer loop, the whole inner loop is directed to steady-state precision by I-control.
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=VVC=BG
The design procedure follows the usual strategy for cascade control: "rstly, the inner loop is
tuned.
Each second-order process has two states: the process value x and its time derivative xR "dx/dt.
The transfer function can be transformed to an equivalent state space representation
x xR "Ax#by
x" ,
xR x"cx#dy
0 1
A"
!1/¹ ¹ !(¹ #¹ )/¹ ¹
0
b" , c"[1 0], d"0
K/¹ ¹
A state feedback for this process is de"ned by
y"!kx"!(k x#k xR )
and can be implemented using
1
k"K
¹
as conventional PD controller with gain K and derivative time ¹ ! This allows to design PD
control for a second-order process with the rigorous mathematical methods of state space
optimization, minimizing a quadratic performance index:
1 0
J" (xQx#yry) dt, Q" \ , r"0.002
0 1
The time-consuming optimizations are performed o%ine for the relevant parameter space
1.1(f"¹ /¹ (40 and the results are approximated with hyperbols for fast online computa-
tion on the PLC:
21.4 8.417
K " 1.5 , ¹ " 0.985! ¹
K f#10.66
The same strategy applies to the design of the I-controller: it is optimized in o%ine simulations for
the relevant parameter space and the resulting tables for the integral time constant are approxi-
mated with a "rst-order polynomial, depending on the already known derivative time constant:
¹ "(0.1236 f#3.322)¹
G
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=Venkatachala=BG
A simulation example for structure decomposition control is shown in Figure 5. Obviously, after
a setpoint step, the manipulated variable does not increase stepwise, but is increasing smoothly
via the integral action of the controller. The setpoint is reached without overshoot.
For processes not allowing a second-order model, controller design is based on the PTn-model
and the modulus optimum, in the form that is already used in many other contoller commission-
ing tools by Siemens [7].
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=VVC=BG
Figure 6. Control Zone with closed-loop control only in a narrow band around the setpoint SP.
LMN is the loop manipulated variable.
Figure 7. Setpoint step with control zone, process parameters K"3, ¹1"200, ¹2"10 ( f"20).
4. PRACTICAL ASPECTS
4.1. Implementation
The new methods described in this paper are implemented as a PLC function block for SIMATIC
S7. Programming language is structured text according to IEC 1131-3. The product name is &PID
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=Venkatachala=BG
Figure 8. Control commissioning for plastic extruder. Setpoint, process value and manipulated variable
for startup procedure to 1803C. (scales: 0}100 per cent manipulated variable for heating only, !100..#100
per cent for heating and cooling, 0}2003C setpoint and process value).
Self-Tuner'. It does not contain a PID controller itself, but is working together with all software
controllers of SIMATIC S7, i.e. &standard PID control', &modular PID control' and the integrated
&step 7 PID control'. The self-tuner takes actual setpoint, process value and manipulated variable
as input signals. During the startup sequence the self-tuner sets the controller in manual mode,
and makes use of the bumpless switching from manual to automatic mode. As a result of
automatic commissioning, the parameters gain, integral time and derivative time of the PID are
de"ned. In a PLC program, controller and self-tuner are called one after each other in the same
cycle. The self-tuner is a very lean function block, needing only 5 kB of code plus 0.3 kB of data
per control channel. It actually requires less resources than the PID controller.
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532
ACS=611=Gracy=VVC=BG
At zone 1 plastic powder is "lled into the machine, and is pressed with extruder screws through
the cylinder zones 2}6, before it leaves the machine with high pressure through a heated tool
(zones 7}10), giving the material the desired pro"le shape. There are 10 temperature zones to be
controlled, all of them measured with thermocouples. Actuators are electrical heating inductors
controlled by solid-state relays. Zones 2}4 are additionally equipped with cooling blast engines
controlled by mechanical relays.
Automatic self-tuning is performed for all 10 channels at the same time as shown in Figure 8.
The control loops are just switched on and supplied with a setpoint, before all self-tuners step
through their startup sequence, identify the process model for the respective control channel, and
take their controllers in automatic operation. After self-tuning has "nished, regular production
can be started in controlled mode. This example does not show the additional cooling test to
identify the di!erence between heating and cooling dynamics.
5. CONCLUSIONS
The &&PID self-tuner'' V1.0 with variable structure control instead of structure decomposition is
delivered since January 1998 to the customers. Patents are pending under Appl. No. 19548909.8,
19722431.8, 19851827.7 and 19851826.9. With the self-tuner, customers are enabled to perform
control commissioning in the sense of a &plug & play'-philosophy: the controller is connected to
input and output signals, afterwards switched on, and is immediately ready to drive the process to
the "rst given setpoint. There are still some control parameters that can be handled by the user,
e.g. to select operating modes, but they only need attention if there are special problems or desires.
The self tuner is applicable to continuous output control, to puls-width modulation control for
binary actuators (relays) and to step control for motor valves with or without position feedback
(repeated manipulated variable). Version 5.0 with structure decomposition is capable to handle
three-point control for two actuators per loop (heating and active cooling) and is available since
September 1999.
REFERENCES
Copyright 2000 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2000; 14:519}532